From: Andy Shevchenko Date: Thu, 13 Feb 2025 18:48:33 +0000 (+0200) Subject: gpio: loongson-64bit: Remove unneeded ngpio assignment X-Git-Tag: v6.15-rc1~179^2~96 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f04867a5d0d3a42fd3b7471343091a22363139e3;p=thirdparty%2Flinux.git gpio: loongson-64bit: Remove unneeded ngpio assignment 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 Link: https://lore.kernel.org/r/20250213184833.3109038-1-andriy.shevchenko@linux.intel.com Signed-off-by: Bartosz Golaszewski --- diff --git a/drivers/gpio/gpio-loongson-64bit.c b/drivers/gpio/gpio-loongson-64bit.c index 7f4d78fd800e7..f000cc0356c79 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); }