gpio: arizona: Remove pointless set of platform drvdata
Subsystems (2)
PATCH 1/2 gpio: arizona: Remove pointless set of platform drvdata
We use the gpio chip private data in all the callbacks so remove this redundant line of code.
Signed-off-by Charles Keepax <[email protected]>
--- drivers/gpio/gpio-arizona.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpio/gpio-arizona.c +0 -2
@@ -140,8 +140,6 @@ static int arizona_gpio_probe(struct platform_device *pdev) goto err; } -platform_set_drvdata (pdev, arizona_gpio); -return ret; err:
Signature · 1 line
2.1.4
PATCH 2/2 gpio: arizona: Tidy up probe error path
There is some unnecessary complexity in the error path which now things are converted to devm is actually very simple. This patch simplifies things.
Signed-off-by Charles Keepax <[email protected]>
--- drivers/gpio/gpio-arizona.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/gpio/gpio-arizona.c +2 -5
@@ -137,13 +137,10 @@ static int arizona_gpio_probe(struct platform_device *pdev)if (ret <0 ) {dev_err (&pdev->dev,"Could not register gpiochip, %d\n" , ret); - goto err; +return ret; } -return ret; - -err: -return ret; +return 0 ; }static struct platform_driver arizona_gpio_driver = {
Signature · 1 line
2.1.4
Quoted 4 lines · Charles Keepax
We use the gpio chip private data in all the callbacks so remove this redundant line of code.
Signed-off-by Charles Keepax <[email protected]>
Patch applied.
Yours,
Linus Walleij
Re: [PATCH 2/2] gpio: arizona: Tidy up probe error path
In reply to Charles KeepaxQuoted 5 lines · Charles Keepax
There is some unnecessary complexity in the error path which now things are converted to devm is actually very simple. This patch simplifies things.
Signed-off-by Charles Keepax <[email protected]>
Patch applied.
Yours,
Linus Walleij