* [PATCH v1 1/1] gpio: loongson-64bit: Remove unneeded ngpio assignment
@ 2025-02-13 18:48 Andy Shevchenko
2025-02-17 9:16 ` Bartosz Golaszewski
0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2025-02-13 18:48 UTC (permalink / raw)
To: Binbin Zhou, linux-gpio, linux-kernel
Cc: Yinbo Zhu, Linus Walleij, Bartosz Golaszewski, Andy Shevchenko
The GPIO library will parse the respective property to fill ngpio.
No need to repeat it in the driver.
While at it, drop unused fwnode field.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/gpio/gpio-loongson-64bit.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/gpio/gpio-loongson-64bit.c b/drivers/gpio/gpio-loongson-64bit.c
index 7f4d78fd800e..f000cc0356c7 100644
--- a/drivers/gpio/gpio-loongson-64bit.c
+++ b/drivers/gpio/gpio-loongson-64bit.c
@@ -31,7 +31,6 @@ struct loongson_gpio_chip_data {
struct loongson_gpio_chip {
struct gpio_chip chip;
- struct fwnode_handle *fwnode;
spinlock_t lock;
void __iomem *reg_base;
const struct loongson_gpio_chip_data *chip_data;
@@ -138,7 +137,6 @@ static int loongson_gpio_init(struct device *dev, struct loongson_gpio_chip *lgp
void __iomem *reg_base)
{
int ret;
- u32 ngpios;
lgpio->reg_base = reg_base;
if (lgpio->chip_data->mode == BIT_CTRL_MODE) {
@@ -159,8 +157,6 @@ static int loongson_gpio_init(struct device *dev, struct loongson_gpio_chip *lgp
lgpio->chip.direction_output = loongson_gpio_direction_output;
lgpio->chip.set = loongson_gpio_set;
lgpio->chip.parent = dev;
- device_property_read_u32(dev, "ngpios", &ngpios);
- lgpio->chip.ngpio = ngpios;
spin_lock_init(&lgpio->lock);
}
--
2.45.1.3035.g276e886db78b
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1 1/1] gpio: loongson-64bit: Remove unneeded ngpio assignment
2025-02-13 18:48 [PATCH v1 1/1] gpio: loongson-64bit: Remove unneeded ngpio assignment Andy Shevchenko
@ 2025-02-17 9:16 ` Bartosz Golaszewski
0 siblings, 0 replies; 2+ messages in thread
From: Bartosz Golaszewski @ 2025-02-17 9:16 UTC (permalink / raw)
To: Binbin Zhou, linux-gpio, linux-kernel, Andy Shevchenko
Cc: Bartosz Golaszewski, Yinbo Zhu, Linus Walleij,
Bartosz Golaszewski
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
On Thu, 13 Feb 2025 20:48:33 +0200, Andy Shevchenko wrote:
> The GPIO library will parse the respective property to fill ngpio.
> No need to repeat it in the driver.
>
> While at it, drop unused fwnode field.
>
>
Applied, thanks!
[1/1] gpio: loongson-64bit: Remove unneeded ngpio assignment
commit: bf1b5ae5db4d817ed976784e5317acc38f037d32
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-02-17 9:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-13 18:48 [PATCH v1 1/1] gpio: loongson-64bit: Remove unneeded ngpio assignment Andy Shevchenko
2025-02-17 9:16 ` Bartosz Golaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).