Skip to contentSkip to conversation

mailbox: remove unnecessary platform_set_drvdata()

PATCH In review Jingoo Han 3 participants 3 messages Aug 22, 2013 – Sep 17, 2013 Mailbox API

lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/1 mailbox: 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/mailbox/mailbox-omap2.c |    1 -
 1 file changed, 1 deletion(-)
drivers/mailbox/mailbox-omap2.c +0 -1
index eba380d..42d2b89 100644
@@ -325,7 +325,6 @@ static int omap2_mbox_remove(struct platform_device *pdev)
 	kfree(privblk);
 	kfree(mboxblk);
 	kfree(list);
-	platform_set_drvdata(pdev, NULL);
 
 	return 0;
 }
Signature · 1 line
1.7.10.4
Acked-by on v1 1/1
#1 lore raw

+ OMAP mailing list

Tony,
Can you pick up this minor cleanup patch?

regards
Suman

Quoted 5 lines · Jingoo Han

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.

Quoted 17 lines
---
 drivers/mailbox/mailbox-omap2.c |    1 -
 1 file changed, 1 deletion(-)
drivers/mailbox/mailbox-omap2.c +0 -1
index eba380d..42d2b89 100644
@@ -325,7 +325,6 @@ static int omap2_mbox_remove(struct platform_device *pdev)
 	kfree(privblk);
 	kfree(mboxblk);
 	kfree(list);
-	platform_set_drvdata(pdev, NULL);
 
 	return 0;
 }
#2 lore raw
Quoted 8 lines · Suman Anna

+ OMAP mailing list

Tony,
Can you pick up this minor cleanup patch?

regards
Suman

Quoted 8 lines
Quoted 5 lines · Jingoo Han

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.

OK applying into omap-for-v3.12/fixes thanks.

Regards,

Tony

Quoted 18 lines
Quoted 17 lines
---
 drivers/mailbox/mailbox-omap2.c |    1 -
 1 file changed, 1 deletion(-)
drivers/mailbox/mailbox-omap2.c +0 -1
index eba380d..42d2b89 100644
@@ -325,7 +325,6 @@ static int omap2_mbox_remove(struct platform_device *pdev)
 	kfree(privblk);
 	kfree(mboxblk);
 	kfree(list);
-	platform_set_drvdata(pdev, NULL);
 
 	return 0;
 }