gpiolib: Remove unused of_mm_gpiochip_add()
Subsystems (2)
PATCH 1/1 gpiolib: Remove unused of_mm_gpiochip_add()
of_mm_gpiochip_add() is unused API, remove it for good.
--- drivers/gpio/TODO | 4 ++-- include/linux/of_gpio.h | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-)
drivers/gpio/TODO +2 -2
@@ -61,8 +61,8 @@ Work items: - Get rid of struct of_mm_gpio_chip altogether: use the generic MMIO GPIO for all current users (see below). Delete struct of_mm_gpio_chip, - to_of_mm_gpio_chip(), of_mm_gpiochip_add_data(), of_mm_gpiochip_add() - of_mm_gpiochip_remove() from the kernel. + to_of_mm_gpio_chip(), of_mm_gpiochip_add_data(), of_mm_gpiochip_remove() + from the kernel. - Change all consumer drivers that #include <linux/of_gpio.h> to #include <linux/gpio/consumer.h> and stop doing custom parsing of the
include/linux/of_gpio.h +0 -5
@@ -56,11 +56,6 @@ extern int of_get_named_gpio(const struct device_node *np,extern int of_mm_gpiochip_add_data (struct device_node *np,struct of_mm_gpio_chip *mm_gc,void *data); -static inline int of_mm_gpiochip_add (struct device_node *np, -struct of_mm_gpio_chip *mm_gc) -{ -return of_mm_gpiochip_add_data (np, mm_gc,NULL ); -}extern void of_mm_gpiochip_remove (struct of_mm_gpio_chip *mm_gc);#else /* CONFIG_OF_GPIO */
Signature · 1 line
2.39.0
Bartosz Golaszewski
AppliedQuoted 41 lines · Andy Shevchenko
of_mm_gpiochip_add()is unused API, remove it for good.Signed-off-by Andy Shevchenko <[email protected]>--- drivers/gpio/TODO | 4 ++-- include/linux/of_gpio.h | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-)drivers/gpio/TODO +2
-2@@ -61,8 +61,8 @@ Work items: - Get rid of struct of_mm_gpio_chip altogether: use the generic MMIO GPIO for all current users (see below). Delete struct of_mm_gpio_chip, - to_of_mm_gpio_chip(), of_mm_gpiochip_add_data(), of_mm_gpiochip_add() - of_mm_gpiochip_remove() from the kernel. + to_of_mm_gpio_chip(), of_mm_gpiochip_add_data(), of_mm_gpiochip_remove() + from the kernel. - Change all consumer drivers that #include <linux/of_gpio.h> to #include <linux/gpio/consumer.h> and stop doing custom parsing of theinclude/linux/of_gpio.h +0
-6@@ -56,11 +56,6 @@ extern int of_get_named_gpio(const struct device_node *np,extern int of_mm_gpiochip_add_data (struct device_node *np,struct of_mm_gpio_chip *mm_gc,void *data); -static inline int of_mm_gpiochip_add (struct device_node *np, -struct of_mm_gpio_chip *mm_gc) -{ -return of_mm_gpiochip_add_data (np, mm_gc,NULL ); -}extern void of_mm_gpiochip_remove (struct of_mm_gpio_chip *mm_gc);#else /* CONFIG_OF_GPIO */ --
Quoted 2 lines
2.39.0
Applied, thanks!
Bart
Rob Herring
maintainerQuoted 28 lines · Andy Shevchenko
of_mm_gpiochip_add()is unused API, remove it for good.Signed-off-by Andy Shevchenko <[email protected]>--- drivers/gpio/TODO | 4 ++-- include/linux/of_gpio.h | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-)drivers/gpio/TODO +2
-2@@ -61,8 +61,8 @@ Work items: - Get rid of struct of_mm_gpio_chip altogether: use the generic MMIO GPIO for all current users (see below). Delete struct of_mm_gpio_chip, - to_of_mm_gpio_chip(), of_mm_gpiochip_add_data(), of_mm_gpiochip_add() - of_mm_gpiochip_remove() from the kernel. + to_of_mm_gpio_chip(), of_mm_gpiochip_add_data(), of_mm_gpiochip_remove() + from the kernel. - Change all consumer drivers that #include <linux/of_gpio.h> to #include <linux/gpio/consumer.h> and stop doing custom parsing of theinclude/linux/of_gpio.h +0
-0
include/linux/of_gpio.h extern int of_get_named_gpio(const struct device_node *np, · line 59
Quoted 9 lines
include/linux/of_gpio.h +0
-5@@ -56,11 +56,6 @@ extern int of_get_named_gpio(const struct device_node *np,extern int of_mm_gpiochip_add_data (struct device_node *np,struct of_mm_gpio_chip *mm_gc,void *data); -static inline int of_mm_gpiochip_add (struct device_node *np, -struct of_mm_gpio_chip *mm_gc) -{ -return of_mm_gpiochip_add_data (np, mm_gc,NULL ); -}extern void of_mm_gpiochip_remove (struct of_mm_gpio_chip *mm_gc);
Keep going!
Looks like of_get_gpio_flags, of_get_gpio, of_gpio_count, of_gpio_named_count, and of_get_named_gpio_flags are all unused.
Rob
Quoted 2 lines · Rob Herring
Quoted 1 line · Andy Shevchenko
of_mm_gpiochip_add()is unused API, remove it for good.
...
Quoted 4 lines
Keep going!
Looks like
of_get_gpio_flags,of_get_gpio,of_gpio_count,of_gpio_named_count, andof_get_named_gpio_flagsare all unused.
Have you checked Linux Next? Everything, but of_gpio_named_count(), which moved to be static, is taken care of by Dmitry Torokhov patches.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 3 lines · Andy Shevchenko
of_mm_gpiochip_add()is unused API, remove it for good.Signed-off-by Andy Shevchenko <[email protected]>
A bit late to the party but THANKS for doing this Andy, it's been a pain for years to have this cruft around.
We even have some traction toward eventual <linux/gpio.h> removal now thanks to Dmitry's efforts, this is great.
Yours,
Linus Walleij
Quoted 9 lines · Linus Walleij
Quoted 3 lines · Andy Shevchenko
of_mm_gpiochip_add()is unused API, remove it for good.Signed-off-by Andy Shevchenko <[email protected]>A bit late to the party but THANKS for doing this Andy, it's been a pain for years to have this cruft around.
You're welcome! But note, that we still have a few more APIs to remove.
Quoted 2 lines
We even have some traction toward eventual <
linux/gpio.h> removal now thanks to Dmitry's efforts, this is great.
I agree, Dmitry did a nice job on this to be happen eventually!
Signature · 2 lines
With Best Regards, Andy Shevchenko