Skip to contentSkip to conversation

pinctrl: sh-pfc: remove unnecessary platform_set_drvdata()

PATCH In review Jingoo Han 2 participants 2 messages Aug 22, 2013 Pin control

lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/1 pinctrl: sh-pfc: remove unnecessary platform_set_drvdata()

The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL.

---
 drivers/pinctrl/sh-pfc/core.c |    2 --
 1 file changed, 2 deletions(-)
drivers/pinctrl/sh-pfc/core.c +0 -2
index 9e66614..738f14f 100644
@@ -539,8 +539,6 @@ static int sh_pfc_remove(struct platform_device *pdev)
 	if (pfc->info->ops && pfc->info->ops->exit)
 		pfc->info->ops->exit(pfc);
 
-	platform_set_drvdata(pdev, NULL);
-
 	return 0;
 }
 
Signature · 1 line
1.7.10.4
Acked-by on v1 1/1
#1 lore raw

Hi Jingoo,

Thank you for the patch.

Quoted 5 lines · On Thursday 22 August 2013 11:00:55 Jingoo Han wrote:

The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL.

Linus, can you take this for v3.12 ? If it's too late I'll take it in my tree and will include it in the v3.13 pull request.

Quoted 16 lines
---
 drivers/pinctrl/sh-pfc/core.c |    2 --
 1 file changed, 2 deletions(-)
drivers/pinctrl/sh-pfc/core.c +0 -2
index 9e66614..738f14f 100644
@@ -539,8 +539,6 @@ static int sh_pfc_remove(struct platform_device *pdev)
 	if (pfc->info->ops && pfc->info->ops->exit)
 		pfc->info->ops->exit(pfc);
 
-	platform_set_drvdata(pdev, NULL);
-
 	return 0;
 }
Signature · 3 lines
Regards,

Laurent Pinchart