From 244b2c5ca8b14627e4a17755e5922221e121c771 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Wed, 09 Oct 2024 06:15:07 +0000
Subject: [PATCH] change system file
---
kernel/drivers/pinctrl/pinctrl-falcon.c | 18 +++++++-----------
1 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/kernel/drivers/pinctrl/pinctrl-falcon.c b/kernel/drivers/pinctrl/pinctrl-falcon.c
index 68dcf53..7521a92 100644
--- a/kernel/drivers/pinctrl/pinctrl-falcon.c
+++ b/kernel/drivers/pinctrl/pinctrl-falcon.c
@@ -1,16 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0-only
/*
* linux/drivers/pinctrl/pinmux-falcon.c
* based on linux/drivers/pinctrl/pinmux-pxa910.c
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 as published
- * by the Free Software Foundation.
*
* Copyright (C) 2012 Thomas Langer <thomas.langer@lantiq.com>
* Copyright (C) 2012 John Crispin <john@phrozen.org>
*/
-#include <linux/gpio.h>
+#include <linux/gpio/driver.h>
#include <linux/interrupt.h>
#include <linux/slab.h>
#include <linux/export.h>
@@ -99,12 +96,8 @@
int i;
for (i = 0; i < len; i++) {
- /* strlen("ioXYZ") + 1 = 6 */
- char *name = kzalloc(6, GFP_KERNEL);
-
- snprintf(name, 6, "io%d", base + i);
d[i].number = base + i;
- d[i].name = name;
+ d[i].name = kasprintf(GFP_KERNEL, "io%d", base + i);
}
pad_count[bank] = len;
}
@@ -462,12 +455,15 @@
put_device(&ppdev->dev);
if (IS_ERR(falcon_info.clk[*bank])) {
dev_err(&ppdev->dev, "failed to get clock\n");
+ of_node_put(np);
return PTR_ERR(falcon_info.clk[*bank]);
}
falcon_info.membase[*bank] = devm_ioremap_resource(&pdev->dev,
&res);
- if (IS_ERR(falcon_info.membase[*bank]))
+ if (IS_ERR(falcon_info.membase[*bank])) {
+ of_node_put(np);
return PTR_ERR(falcon_info.membase[*bank]);
+ }
avail = pad_r32(falcon_info.membase[*bank],
LTQ_PADC_AVAIL);
--
Gitblit v1.6.2