gpio: tc3589x: remove unnecessary platform_set_drvdata()
PATCH 5/7 gpio: tc3589x: remove unnecessary platform_set_drvdata()
The driver core clears the driver data to NULL after device_release or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d (device-core: Ensure drvdata = NULL when no driver is bound). Thus, it is not needed to manually clear the device driver data to NULL.
--- drivers/gpio/gpio-tc3589x.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
drivers/gpio/gpio-tc3589x.c +0 -1
@@ -407,7 +407,6 @@ static int tc3589x_gpio_remove(struct platform_device *pdev)free_irq (irq, tc3589x_gpio); -platform_set_drvdata (pdev,NULL );kfree (tc3589x_gpio);return 0 ;
Signature · 1 line
1.7.2.5
Quoted 15 lines · Jingoo Han
The driver core clears the driver data to NULL after
device_releaseor on probe failure, since commit0998d0631001288a5974afc0b2a5f568bcdecb4d(device-core: Ensure drvdata = NULL when no driver is bound). Thus, it is not needed to manually clear the device driver data to NULL.Signed-off-by Jingoo Han <[email protected]>--- drivers/gpio/gpio-tc3589x.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)drivers/gpio/gpio-tc3589x.c +0
-0
drivers/gpio/gpio-tc3589x.c static int tc3589x_gpio_remove(struct platform_device *pdev) · line 412
Quoted 7 lines
drivers/gpio/gpio-tc3589x.c +0
-1@@ -407,7 +407,6 @@ static int tc3589x_gpio_remove(struct platform_device *pdev)free_irq (irq, tc3589x_gpio); -platform_set_drvdata (pdev,NULL );kfree (tc3589x_gpio);return 0 ;
Signature · 4 lines
Lee Jones Linaro ST-Ericsson Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
Quoted 6 lines · Jingoo Han
The driver core clears the driver data to NULL after
device_releaseor on probe failure, since commit0998d0631001288a5974afc0b2a5f568bcdecb4d(device-core: Ensure drvdata = NULL when no driver is bound). Thus, it is not needed to manually clear the device driver data to NULL.Signed-off-by Jingoo Han <[email protected]>
Patch applied with Lee's ACK.
Yours,
Linus Walleij