* [PATCH] pinctrl: sh-pfc: core: don't open code of_device_get_match_data()
@ 2016-03-01 16:38 Wolfram Sang
2016-03-02 9:15 ` Geert Uytterhoeven
2016-03-09 3:47 ` Linus Walleij
0 siblings, 2 replies; 3+ messages in thread
From: Wolfram Sang @ 2016-03-01 16:38 UTC (permalink / raw)
To: linux-renesas-soc
Cc: Wolfram Sang, Laurent Pinchart, Geert Uytterhoeven, Linus Walleij,
linux-gpio
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
This change will also make Coverity happy by avoiding a theoretical NULL
pointer dereference; yet another reason is to use the above helper function
to tighten the code and make it more readable.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
Tested on a Lager board.
drivers/pinctrl/sh-pfc/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/sh-pfc/core.c b/drivers/pinctrl/sh-pfc/core.c
index 181ea98a63b7ab..cd42d32791e3b7 100644
--- a/drivers/pinctrl/sh-pfc/core.c
+++ b/drivers/pinctrl/sh-pfc/core.c
@@ -518,7 +518,7 @@ static int sh_pfc_probe(struct platform_device *pdev)
#ifdef CONFIG_OF
if (np)
- info = of_match_device(sh_pfc_of_table, &pdev->dev)->data;
+ info = of_device_get_match_data(&pdev->dev);
else
#endif
info = platid ? (const void *)platid->driver_data : NULL;
--
2.7.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] pinctrl: sh-pfc: core: don't open code of_device_get_match_data()
2016-03-01 16:38 [PATCH] pinctrl: sh-pfc: core: don't open code of_device_get_match_data() Wolfram Sang
@ 2016-03-02 9:15 ` Geert Uytterhoeven
2016-03-09 3:47 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2016-03-02 9:15 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-renesas-soc, Laurent Pinchart, Geert Uytterhoeven,
Linus Walleij, linux-gpio@vger.kernel.org
On Tue, Mar 1, 2016 at 5:38 PM, Wolfram Sang <wsa@the-dreams.de> wrote:
> From: Wolfram Sang <wsa+renesas@sang-engineering.com>
>
> This change will also make Coverity happy by avoiding a theoretical NULL
> pointer dereference; yet another reason is to use the above helper function
> to tighten the code and make it more readable.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Will queue in sh-pfc-for-v4.7.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] pinctrl: sh-pfc: core: don't open code of_device_get_match_data()
2016-03-01 16:38 [PATCH] pinctrl: sh-pfc: core: don't open code of_device_get_match_data() Wolfram Sang
2016-03-02 9:15 ` Geert Uytterhoeven
@ 2016-03-09 3:47 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2016-03-09 3:47 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-renesas-soc, Laurent Pinchart, Geert Uytterhoeven,
linux-gpio@vger.kernel.org
On Tue, Mar 1, 2016 at 11:38 PM, Wolfram Sang <wsa@the-dreams.de> wrote:
> From: Wolfram Sang <wsa+renesas@sang-engineering.com>
>
> This change will also make Coverity happy by avoiding a theoretical NULL
> pointer dereference; yet another reason is to use the above helper function
> to tighten the code and make it more readable.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Patch applied with Geert's ACK.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-03-09 3:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-01 16:38 [PATCH] pinctrl: sh-pfc: core: don't open code of_device_get_match_data() Wolfram Sang
2016-03-02 9:15 ` Geert Uytterhoeven
2016-03-09 3:47 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).