mirror of
https://gitee.com/open-loongarch/linux-6.12.git
synced 2026-10-25 20:47:11 +08:00
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 <andriy.shevchenko@linux.intel.com>
This commit is contained in:
committed by
maoxiaochuan
parent
c94ef33bff
commit
7bd1154c2e
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user