[PATCH] i2c: Remove unneeded xxx_set_drvdata(..., NULL) calls
Peter Korsgaard
jacmet at sunsite.dk
Mon Feb 18 02:12:31 EST 2013
>>>>> "Doug" == Doug Anderson <dianders at chromium.org> writes:
Doug> There is simply no reason to be manually setting the private driver
Doug> data to NULL in the remove/fail to probe cases. This is just extra
Doug> cruft code that can be removed.
Doug> A few notes:
Doug> * Nothing relies on drvdata being set to NULL.
Doug> * The __device_release_driver() function eventually calls
Doug> dev_set_drvdata(dev, NULL) anyway, so there's no need to do it
Doug> twice.
Doug> * I verified that there were no cases where xxx_get_drvdata() was
Doug> being called in these drivers and checking for / relying on the NULL
Doug> return value.
Doug> This could be cleaned up kernel-wide but for now just take the baby
Doug> step and remove from the i2c subsystem.
Doug> Reported-by: Wolfram Sang <wsa at the-dreams.de>
Doug> Reported-by: Stephen Warren <swarren at wwwdotorg.org>
Doug> Signed-off-by: Doug Anderson <dianders at chromium.org>
For i2c-ocores.c + i2c-mux-gpio.c:
Acked-by: Peter Korsgaard <jacmet at sunsite.dk>
--
Bye, Peter Korsgaard
More information about the Linuxppc-dev
mailing list