pinctrl: digicolor: Remove duplicate assignment of of_gpio_n_cells
Subsystems (3)
PATCH v2 1/2 pinctrl: digicolor: Remove duplicate assignment of of_gpio_n_cells
The of_gpio_n_cells default is 2 when ->of_xlate() callback is not defined. No need to assign it explicitly in the driver.
---
v2: added tag (Baruch), avoid confusion with previously sent patch
drivers/pinctrl/pinctrl-digicolor.c | 1 - 1 file changed, 1 deletion(-)
drivers/pinctrl/pinctrl-digicolor.c +0 -1
@@ -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);
Signature · 7 lines
2.39.0 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH v2 2/2 pinctrl: digicolor: Use proper headers and drop OF dependency
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.
---
v2: added tag (Baruch)
drivers/pinctrl/Kconfig | 2 +- drivers/pinctrl/pinctrl-digicolor.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-)
drivers/pinctrl/Kconfig +1 -1
@@ -170,7 +170,7 @@ config PINCTRL_DA9062 config PINCTRL_DIGICOLOR bool - depends on OF && (ARCH_DIGICOLOR || COMPILE_TEST) + depends on ARCH_DIGICOLOR || COMPILE_TEST select PINMUX select GENERIC_PINCONF
drivers/pinctrl/pinctrl-digicolor.c +5 -4
@@ -11,18 +11,19 @@* - Pin pad configuration (pull up/down, strength) */ +#include <linux/gpio/driver.h> #include <linux/init.h> -#include <linux/platform_device.h> -#include <linux/of.h> -#include <linux/of_device.h> #include <linux/io.h> -#include <linux/gpio/driver.h> +#include <linux/mod_devicetable.h> +#include <linux/platform_device.h> #include <linux/spinlock.h> +#include <linux/pinctrl/machine.h> #include <linux/pinctrl/pinconf.h> #include <linux/pinctrl/pinconf-generic.h> #include <linux/pinctrl/pinctrl.h> #include <linux/pinctrl/pinmux.h> +#include "pinctrl-utils.h" #define DRIVER_NAME "pinctrl-digicolor"
Signature · 7 lines
2.39.0 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 7 lines · Andy Shevchenko
The
of_gpio_n_cellsdefault is 2 when ->of_xlate() callback is not defined. No need to assign it explicitly in the driver.Signed-off-by Andy Shevchenko <[email protected]>Acked-by Baruch Siach <[email protected]>---
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
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 6 lines · Linus Walleij
Quoted 3 lines · Andy Shevchenko
The
of_gpio_n_cellsdefault is 2 when ->of_xlate() callback is not defined. No need to assign it explicitly in the driver.
Quoted 8 lines
Quoted 4 lines
Signed-off-by Andy Shevchenko <[email protected]>Acked-by Baruch Siach <[email protected]>---
v2: added tag (Baruch), avoid confusion with previously sent patchTook out v1 and applied the v2 version instead!
(Hoping there is no v3 version I have missed too...)
Nope, thanks!
Signature · 9 lines
With Best Regards, Andy Shevchenko _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel