Skip to contentSkip to conversation

gpio: tegra: Staticize non-exported symbols

PATCH In review Axel Lin 3 participants 5 messages Nov 8, 2012

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/2 gpio: tegra: Staticize non-exported symbols

Both tegra_gpio_request() and tegra_gpio_free() are not referenced outside of this file, make them static.

---
 drivers/gpio/gpio-tegra.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpio/gpio-tegra.c +2 -2
index c7c175a..d5c01f0 100644
@@ -117,12 +117,12 @@ static void tegra_gpio_disable(int gpio)
 }
 EXPORT_SYMBOL_GPL(tegra_gpio_disable);
 
-int tegra_gpio_request(struct gpio_chip *chip, unsigned offset)
+static int tegra_gpio_request(struct gpio_chip *chip, unsigned offset)
 {
 	return pinctrl_request_gpio(offset);
 }
 
-void tegra_gpio_free(struct gpio_chip *chip, unsigned offset)
+static void tegra_gpio_free(struct gpio_chip *chip, unsigned offset)
 {
 	pinctrl_free_gpio(offset);
 	tegra_gpio_disable(offset);
Signature · 1 line
1.7.9.5
author
#1 lore raw

PATCH 2/2 gpio: tegra: Drop exporting static functions

Both tegra_gpio_enable() and tegra_gpio_disable() are static functions, it does not make sense to export them.

---
 drivers/gpio/gpio-tegra.c |    2 --
 1 file changed, 2 deletions(-)
drivers/gpio/gpio-tegra.c +0 -2
index d5c01f0..f6cf98f 100644
@@ -109,13 +109,11 @@ static void tegra_gpio_enable(int gpio)
 {
 	tegra_gpio_mask_write(GPIO_MSK_CNF(gpio), gpio, 1);
 }
-EXPORT_SYMBOL_GPL(tegra_gpio_enable);
 
 static void tegra_gpio_disable(int gpio)
 {
 	tegra_gpio_mask_write(GPIO_MSK_CNF(gpio), gpio, 0);
 }
-EXPORT_SYMBOL_GPL(tegra_gpio_disable);
 
 static int tegra_gpio_request(struct gpio_chip *chip, unsigned offset)
 {
Signature · 1 line
1.7.9.5
#2 lore raw

Re: [PATCH 2/2] gpio: tegra: Drop exporting static functions

Quoted 4 lines · Axel Lin

Both tegra_gpio_enable() and tegra_gpio_disable() are static functions, it does not make sense to export them.

Applied with Stephen's ACK.

Yours,
Linus Walleij