mailbox: remove unnecessary platform_set_drvdata()
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
@@ -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
+ 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_releaseor on probe failure. Thus, it is not needed to manually clear the device driver data to NULL.Signed-off-by Jingoo Han <[email protected]>
Quoted 17 lines
--- drivers/mailbox/mailbox-omap2.c | 1 - 1 file changed, 1 deletion(-)drivers/mailbox/mailbox-omap2.c +0
-1@@ -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 ; }
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_releaseor on probe failure. Thus, it is not needed to manually clear the device driver data to NULL.Signed-off-by Jingoo Han <[email protected]>Acked-by Suman Anna <[email protected]>
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@@ -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 ; }