Skip to contentSkip to conversation

gpio: loongson-64bit: Remove unneeded ngpio assignment

PATCH Applied Andy Shevchenko 2 participants 2 messages Feb 13, 2025 – Feb 17, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/gpio/gpio-loongson-64bit.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/gpio/gpio-loongson-64bit.c +0 -4
index 7f4d78fd800e..f000cc0356c7 100644
@@ -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);
 	}
 
Signature · 1 line
2.45.1.3035.g276e886db78b
#1 lore raw

From: Bartosz Golaszewski <[email protected]>

Quoted 6 lines · 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.

Applied, thanks!

[1/1] gpio: loongson-64bit: Remove unneeded ngpio assignment

      commit: bf1b5ae5db4d817ed976784e5317acc38f037d32

Best regards,

Signature · 1 line
Bartosz Golaszewski <[email protected]>