2019-09-25 17:41:17

by Rasmus Villemoes

[permalink] [raw]
Subject: [PATCH] pinctrl: devicetree.c: remove orphan pinctrl_dt_has_hogs()

The helper pinctrl_dt_has_hogs() was introduced in
99e4f67508e1 (pinctrl: core: Use delayed work for hogs), but the sole
use then got removed shortly after in 950b0d91dc10 (pinctrl: core: Fix
regression caused by delayed work for hogs).

Signed-off-by: Rasmus Villemoes <[email protected]>
---
drivers/pinctrl/devicetree.c | 15 ---------------
drivers/pinctrl/devicetree.h | 7 -------
2 files changed, 22 deletions(-)

diff --git a/drivers/pinctrl/devicetree.c b/drivers/pinctrl/devicetree.c
index 5d6d8b1e9062..6716a406d128 100644
--- a/drivers/pinctrl/devicetree.c
+++ b/drivers/pinctrl/devicetree.c
@@ -166,21 +166,6 @@ static int dt_remember_dummy_state(struct pinctrl *p, const char *statename)
return dt_remember_or_free_map(p, statename, NULL, map, 1);
}

-bool pinctrl_dt_has_hogs(struct pinctrl_dev *pctldev)
-{
- struct device_node *np;
- struct property *prop;
- int size;
-
- np = pctldev->dev->of_node;
- if (!np)
- return false;
-
- prop = of_find_property(np, "pinctrl-0", &size);
-
- return prop ? true : false;
-}
-
int pinctrl_dt_to_map(struct pinctrl *p, struct pinctrl_dev *pctldev)
{
struct device_node *np = p->dev->of_node;
diff --git a/drivers/pinctrl/devicetree.h b/drivers/pinctrl/devicetree.h
index 00e645d7fac7..efa80779de4f 100644
--- a/drivers/pinctrl/devicetree.h
+++ b/drivers/pinctrl/devicetree.h
@@ -9,8 +9,6 @@ struct of_phandle_args;

#ifdef CONFIG_OF

-bool pinctrl_dt_has_hogs(struct pinctrl_dev *pctldev);
-
void pinctrl_dt_free_maps(struct pinctrl *p);
int pinctrl_dt_to_map(struct pinctrl *p, struct pinctrl_dev *pctldev);

@@ -23,11 +21,6 @@ int pinctrl_parse_index_with_args(const struct device_node *np,

#else

-static inline bool pinctrl_dt_has_hogs(struct pinctrl_dev *pctldev)
-{
- return false;
-}
-
static inline int pinctrl_dt_to_map(struct pinctrl *p,
struct pinctrl_dev *pctldev)
{
--
2.20.1


2019-09-25 21:21:39

by Tony Lindgren

[permalink] [raw]
Subject: Re: [PATCH] pinctrl: devicetree.c: remove orphan pinctrl_dt_has_hogs()

* Rasmus Villemoes <[email protected]> [190923 14:20]:
> The helper pinctrl_dt_has_hogs() was introduced in
> 99e4f67508e1 (pinctrl: core: Use delayed work for hogs), but the sole
> use then got removed shortly after in 950b0d91dc10 (pinctrl: core: Fix
> regression caused by delayed work for hogs).

Oops, thanks for catching it:

Acked-by: Tony Lindgren <[email protected]>

2019-10-04 21:31:30

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH] pinctrl: devicetree.c: remove orphan pinctrl_dt_has_hogs()

On Mon, Sep 23, 2019 at 4:20 PM Rasmus Villemoes
<[email protected]> wrote:

> The helper pinctrl_dt_has_hogs() was introduced in
> 99e4f67508e1 (pinctrl: core: Use delayed work for hogs), but the sole
> use then got removed shortly after in 950b0d91dc10 (pinctrl: core: Fix
> regression caused by delayed work for hogs).
>
> Signed-off-by: Rasmus Villemoes <[email protected]>

Patch applied with Tony's ACK!

Yours,
Linus Walleij