diff mbox series

[v1,1/1] pinctrl: sunplus: sppctl: Remove duplicate assignment of of_gpio_n_cells

Message ID 20230112185122.45216-1-andriy.shevchenko@linux.intel.com
State Accepted
Commit ef4290e6bd99149d21c99bb4905c61f8c94a05ca
Headers show
Series [v1,1/1] pinctrl: sunplus: sppctl: Remove duplicate assignment of of_gpio_n_cells | expand

Commit Message

Andy Shevchenko Jan. 12, 2023, 6:51 p.m. UTC
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>
---
 drivers/pinctrl/sunplus/sppctl.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Linus Walleij Jan. 16, 2023, 2:03 p.m. UTC | #1
On Thu, Jan 12, 2023 at 7:50 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:

> 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>

Patch applied!

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/drivers/pinctrl/sunplus/sppctl.c b/drivers/pinctrl/sunplus/sppctl.c
index 9c57bccc4bda..2ed0591fb51d 100644
--- a/drivers/pinctrl/sunplus/sppctl.c
+++ b/drivers/pinctrl/sunplus/sppctl.c
@@ -553,7 +553,6 @@  static int sppctl_gpio_new(struct platform_device *pdev, struct sppctl_pdata *pc
 	gchip->base             = -1;
 	gchip->ngpio            = sppctl_gpio_list_sz;
 	gchip->names            = sppctl_gpio_list_s;
-	gchip->of_gpio_n_cells  = 2;
 
 	pctl->pctl_grange.npins = gchip->ngpio;
 	pctl->pctl_grange.name  = gchip->label;