[v2,1/2] pinctrl: digicolor: Remove duplicate assignment of of_gpio_n_cells

Message ID 20230113143640.24302-1-andriy.shevchenko@linux.intel.com
State New
Headers
Series [v2,1/2] pinctrl: digicolor: Remove duplicate assignment of of_gpio_n_cells |

Commit Message

Andy Shevchenko Jan. 13, 2023, 2:36 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>
Acked-by: Baruch Siach <baruch@tkos.co.il>
---
v2: added tag (Baruch), avoid confusion with previously sent patch
 drivers/pinctrl/pinctrl-digicolor.c | 1 -
 1 file changed, 1 deletion(-)
  

Comments

Linus Walleij Jan. 16, 2023, 2:14 p.m. UTC | #1
On Fri, Jan 13, 2023 at 3:36 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>
> Acked-by: Baruch Siach <baruch@tkos.co.il>
> ---
> v2: added tag (Baruch), avoid confusion with previously sent patch

Took out v1 and applied the v2 version instead!

(Hoping there is no v3 version I have missed too...)

Yours,
Linus Walleij
  
Andy Shevchenko Jan. 16, 2023, 2:40 p.m. UTC | #2
On Mon, Jan 16, 2023 at 03:14:38PM +0100, Linus Walleij wrote:
> On Fri, Jan 13, 2023 at 3:36 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>
> > Acked-by: Baruch Siach <baruch@tkos.co.il>
> > ---
> > v2: added tag (Baruch), avoid confusion with previously sent patch
> 
> Took out v1 and applied the v2 version instead!
> 
> (Hoping there is no v3 version I have missed too...)

Nope, thanks!
  

Patch

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