Message ID | 20230112184823.80349-1-andriy.shevchenko@linux.intel.com |
---|---|
State | Superseded |
Headers | show |
Series | [v1,1/2] pinctrl: digicolor: Remove duplicate assignment of of_gpio_n_cells | expand |
Hi Andy, On Thu, Jan 12 2023, Andy Shevchenko 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> Acked-by: Baruch Siach <baruch@tkos.co.il> baruch > --- > drivers/pinctrl/pinctrl-digicolor.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/pinctrl/pinctrl-digicolor.c b/drivers/pinctrl/pinctrl-digicolor.c > index cc3546fc4610..05213261b8a4 100644 > --- a/drivers/pinctrl/pinctrl-digicolor.c > +++ b/drivers/pinctrl/pinctrl-digicolor.c > @@ -248,7 +248,6 @@ static int dc_gpiochip_add(struct dc_pinmap *pmap) > chip->set = dc_gpio_set; > chip->base = -1; > chip->ngpio = PINS_COUNT; > - chip->of_gpio_n_cells = 2; > > spin_lock_init(&pmap->lock);
On Thu, Jan 12, 2023 at 7:48 PM Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > The driver doesn't depend on the OF to be complied. Hence > the proper header to use is mod_devicetable.h. Replace of*.h with > the above mentioned and drop redundant dependency. > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Both patches applied! Yours, Linus Walleij
diff --git a/drivers/pinctrl/pinctrl-digicolor.c b/drivers/pinctrl/pinctrl-digicolor.c index cc3546fc4610..05213261b8a4 100644 --- a/drivers/pinctrl/pinctrl-digicolor.c +++ b/drivers/pinctrl/pinctrl-digicolor.c @@ -248,7 +248,6 @@ static int dc_gpiochip_add(struct dc_pinmap *pmap) chip->set = dc_gpio_set; chip->base = -1; chip->ngpio = PINS_COUNT; - chip->of_gpio_n_cells = 2; spin_lock_init(&pmap->lock);
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/pinctrl-digicolor.c | 1 - 1 file changed, 1 deletion(-)