Skip to contentSkip to conversation

pinctrl: lantiq: Remove ltq_pmx_disable() function

PATCH In review Axel Lin 3 participants 7 messages Nov 7, 2012 – Nov 11, 2012 Pin control

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/2 pinctrl: lantiq: Remove ltq_pmx_disable() function

Current code adds empty ltq_pmx_disable() because pinmux_check_ops() requires this callback to be defined.

This is not required since commit 02b50ce4cb1
"pinctrl: make pinmux disable function optional".

Thus remove ltq_pmx_disable() function.

---
 drivers/pinctrl/pinctrl-lantiq.c |   11 -----------
 1 file changed, 11 deletions(-)
drivers/pinctrl/pinctrl-lantiq.c +0 -11
index 07ba768..d670ad6 100644
@@ -275,16 +275,6 @@ static int ltq_pmx_enable(struct pinctrl_dev *pctrldev,
 	return 0;
 }
 
-static void ltq_pmx_disable(struct pinctrl_dev *pctrldev,
-				unsigned func,
-				unsigned group)
-{
-	/*
-	 * Nothing to do here. However, pinconf_check_ops() requires this
-	 * callback to be defined.
-	 */
-}
-
 static int ltq_pmx_gpio_request_enable(struct pinctrl_dev *pctrldev,
 				struct pinctrl_gpio_range *range,
 				unsigned pin)
@@ -312,7 +302,6 @@ static struct pinmux_ops ltq_pmx_ops = {
 	.get_function_name	= ltq_pmx_func_name,
 	.get_function_groups	= ltq_pmx_get_groups,
 	.enable			= ltq_pmx_enable,
-	.disable		= ltq_pmx_disable,
 	.gpio_request_enable	= ltq_pmx_gpio_request_enable,
 };
 
Signature · 1 line
1.7.9.5
author
#1 lore raw

PATCH 2/2 pinctrl: lantiq: Staticize ltq_pinctrl_dt_free_map

It is not referenced outside of this file.

---
 drivers/pinctrl/pinctrl-lantiq.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/pinctrl/pinctrl-lantiq.c +4 -4
index d670ad6..4eb6854 100644
@@ -128,10 +128,10 @@ static int ltq_pinctrl_dt_subnode_size(struct device_node *np)
 	return ret;
 }
 
-int ltq_pinctrl_dt_node_to_map(struct pinctrl_dev *pctldev,
-				struct device_node *np_config,
-				struct pinctrl_map **map,
-				unsigned *num_maps)
+static int ltq_pinctrl_dt_node_to_map(struct pinctrl_dev *pctldev,
+				      struct device_node *np_config,
+				      struct pinctrl_map **map,
+				      unsigned *num_maps)
 {
 	struct pinctrl_map *tmp;
 	struct device_node *np;
Signature · 1 line
1.7.9.5
author
#2 lore raw

Re: [PATCH 2/2] pinctrl: lantiq: Staticize ltq_pinctrl_dt_free_map

於 三,2012-11-07 於 23:58 +0800,Axel Lin 提到:

Quoted 1 line

It is not referenced outside of this file.

Oh. Both ltq_pinctrl_dt_free_map and ltq_pinctrl_dt_node_to_map are only used in this file.
I'll resend this patch.

Axel

author
#3 lore raw

PATCH 2/2 pinctrl: lantiq: Staticize non-exported symbols

In reply to Axel Lin

Both ltq_pinctrl_dt_node_to_map() and ltq_pinctrl_dt_free_map() are not referenced outside of this file. Make them static.

---
 drivers/pinctrl/pinctrl-lantiq.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/pinctrl/pinctrl-lantiq.c +6 -6
index d670ad6..15f501d 100644
@@ -46,8 +46,8 @@ static int ltq_get_group_pins(struct pinctrl_dev *pctrldev,
 	return 0;
 }
 
-void ltq_pinctrl_dt_free_map(struct pinctrl_dev *pctldev,
-				struct pinctrl_map *map, unsigned num_maps)
+static void ltq_pinctrl_dt_free_map(struct pinctrl_dev *pctldev,
+				    struct pinctrl_map *map, unsigned num_maps)
 {
 	int i;
 
@@ -128,10 +128,10 @@ static int ltq_pinctrl_dt_subnode_size(struct device_node *np)
 	return ret;
 }
 
-int ltq_pinctrl_dt_node_to_map(struct pinctrl_dev *pctldev,
-				struct device_node *np_config,
-				struct pinctrl_map **map,
-				unsigned *num_maps)
+static int ltq_pinctrl_dt_node_to_map(struct pinctrl_dev *pctldev,
+				      struct device_node *np_config,
+				      struct pinctrl_map **map,
+				      unsigned *num_maps)
 {
 	struct pinctrl_map *tmp;
 	struct device_node *np;
Signature · 1 line
1.7.9.5
#4 lore raw

Re: [PATCH 2/2] pinctrl: lantiq: Staticize non-exported symbols

Quoted 4 lines · Axel Lin

Both ltq_pinctrl_dt_node_to_map() and ltq_pinctrl_dt_free_map() are not referenced outside of this file. Make them static.

Applied with John's ACK.

Yours,
Linus Walleij

#6 lore raw
In reply to Axel Lin
Quoted 9 lines · Axel Lin

Current code adds empty ltq_pmx_disable() because pinmux_check_ops() requires this callback to be defined.

This is not required since commit 02b50ce4cb1
"pinctrl: make pinmux disable function optional".

Thus remove ltq_pmx_disable() function.

Applied with John's ACK.

Yours,
Linus Walleij