pinctrl: mediatek: Remove duplicate assignment of of_gpio_n_cells
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 12 Jan 2023 18:43:40 +0000 (20:43 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 16 Jan 2023 14:01:28 +0000 (15:01 +0100)
The of_gpio_n_cells default is 2 when ->of_xlate() callback is
not defined. No need to assign it explicitly in the driver.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230112184340.79606-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/mediatek/pinctrl-moore.c
drivers/pinctrl/mediatek/pinctrl-mtk-common.c
drivers/pinctrl/mediatek/pinctrl-paris.c

index 1ec0413959e1567b3ed6bf92bf696b99ed6b4158..007b98ce563152d233a0632a2dcf239209c55680 100644 (file)
@@ -574,7 +574,6 @@ static int mtk_build_gpiochip(struct mtk_pinctrl *hw)
        chip->set_config        = mtk_gpio_set_config;
        chip->base              = -1;
        chip->ngpio             = hw->soc->npins;
-       chip->of_gpio_n_cells   = 2;
 
        ret = gpiochip_add_data(chip, hw);
        if (ret < 0)
index 553d16703475b8e37001d514a74691ec900263d6..665dec419e7cb8783379ba415a36e5efefccf1d9 100644 (file)
@@ -906,7 +906,6 @@ static const struct gpio_chip mtk_gpio_chip = {
        .set                    = mtk_gpio_set,
        .to_irq                 = mtk_gpio_to_irq,
        .set_config             = mtk_gpio_set_config,
-       .of_gpio_n_cells        = 2,
 };
 
 static int mtk_eint_suspend(struct device *device)
index 475f4172d508528ceeae680549b665d2d8735bcb..17eead44b675735268e1c592526a6fc92ca6a6de 100644 (file)
@@ -987,7 +987,6 @@ static int mtk_build_gpiochip(struct mtk_pinctrl *hw)
        chip->set_config        = mtk_gpio_set_config;
        chip->base              = -1;
        chip->ngpio             = hw->soc->npins;
-       chip->of_gpio_n_cells   = 2;
 
        ret = gpiochip_add_data(chip, hw);
        if (ret < 0)