[PATCH] mtd: nand: use platform_{get,set}_drvdata()

Jingoo Han jg1.han at samsung.com
Mon May 27 21:01:24 EDT 2013


On Tuesday, May 28, 2013 4:12 AM, Brian Norris wrote:
> 
> On Thu, May 23, 2013 at 3:31 AM, Jingoo Han <jg1.han at samsung.com> wrote:
> > Use the wrapper functions for getting and setting the driver data using
> > platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
> > so we can directly pass a struct platform_device.
> 
> This patch also removes a "dev_set_drvdata(dev, NULL)". Is this no
> longer necessary during device removal? Otherwise:

Hi Brian,

The "dev_set_drvdata(dev, NULL)" is unnecessary, because
the driver core clears the driver data to NULL after device_release
or on probe failure.

Best regards,
Jingoo Han

> 
> Acked-by: Brian Norris <computersforpeace at gmail.com>
> 
> > Signed-off-by: Jingoo Han <jg1.han at samsung.com>
> > ---





More information about the linux-mtd mailing list