2012-11-07 15:58:13

by Axel Lin

[permalink] [raw]
Subject: [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.

Signed-off-by: Axel Lin <[email protected]>
---
drivers/pinctrl/pinctrl-lantiq.c | 11 -----------
1 file changed, 11 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-lantiq.c b/drivers/pinctrl/pinctrl-lantiq.c
index 07ba768..d670ad6 100644
--- a/drivers/pinctrl/pinctrl-lantiq.c
+++ b/drivers/pinctrl/pinctrl-lantiq.c
@@ -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,
};

--
1.7.9.5



2012-11-07 15:58:56

by Axel Lin

[permalink] [raw]
Subject: [PATCH 2/2] pinctrl: lantiq: Staticize ltq_pinctrl_dt_free_map

It is not referenced outside of this file.

Signed-off-by: Axel Lin <[email protected]>
---
drivers/pinctrl/pinctrl-lantiq.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-lantiq.c b/drivers/pinctrl/pinctrl-lantiq.c
index d670ad6..4eb6854 100644
--- a/drivers/pinctrl/pinctrl-lantiq.c
+++ b/drivers/pinctrl/pinctrl-lantiq.c
@@ -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;
--
1.7.9.5


2012-11-07 16:05:55

by Axel Lin

[permalink] [raw]
Subject: Re: [PATCH 2/2] pinctrl: lantiq: Staticize ltq_pinctrl_dt_free_map

於 三,2012-11-07 於 23:58 +0800,Axel Lin 提到:
> 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

2012-11-07 16:10:24

by Axel Lin

[permalink] [raw]
Subject: [PATCH 2/2] pinctrl: lantiq: Staticize non-exported symbols

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

Signed-off-by: Axel Lin <[email protected]>
---
drivers/pinctrl/pinctrl-lantiq.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-lantiq.c b/drivers/pinctrl/pinctrl-lantiq.c
index d670ad6..15f501d 100644
--- a/drivers/pinctrl/pinctrl-lantiq.c
+++ b/drivers/pinctrl/pinctrl-lantiq.c
@@ -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;
--
1.7.9.5


2012-11-07 19:25:58

by John Crispin

[permalink] [raw]
Subject: Re: [PATCH 1/2] pinctrl: lantiq: Remove ltq_pmx_disable() function

On 07/11/12 16:57, Axel Lin wrote:
> 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.
>
> Signed-off-by: Axel Lin<[email protected]>
>

for both of these feel free to add ...

Acked-by: John Crispin <[email protected]>

Thanks,
John

2012-11-11 18:20:31

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 1/2] pinctrl: lantiq: Remove ltq_pmx_disable() function

On Wed, Nov 7, 2012 at 4:57 PM, Axel Lin <[email protected]> wrote:

> 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.
>
> Signed-off-by: Axel Lin <[email protected]>

Applied with John's ACK.

Yours,
Linus Walleij

2012-11-11 18:22:01

by Linus Walleij

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

On Wed, Nov 7, 2012 at 5:10 PM, Axel Lin <[email protected]> wrote:

> Both ltq_pinctrl_dt_node_to_map() and ltq_pinctrl_dt_free_map() are not
> referenced outside of this file. Make them static.
>
> Signed-off-by: Axel Lin <[email protected]>

Applied with John's ACK.

Yours,
Linus Walleij