On Thu, May 23, 2013 at 3:28 AM, Jingoo Han <jg1.han@xxxxxxxxxxx> 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. > Thanks, I just merged it. -Bryan > Signed-off-by: Jingoo Han <jg1.han@xxxxxxxxxxx> > --- > drivers/leds/leds-88pm860x.c | 2 +- > drivers/leds/leds-sunfire.c | 4 ++-- > drivers/leds/leds-wm831x-status.c | 2 +- > 3 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/leds/leds-88pm860x.c b/drivers/leds/leds-88pm860x.c > index f5b9ea3..232b3ce 100644 > --- a/drivers/leds/leds-88pm860x.c > +++ b/drivers/leds/leds-88pm860x.c > @@ -204,7 +204,7 @@ static int pm860x_led_probe(struct platform_device *pdev) > sprintf(data->name, "led1-blue"); > break; > } > - dev_set_drvdata(&pdev->dev, data); > + platform_set_drvdata(pdev, data); > data->chip = chip; > data->i2c = (chip->id == CHIP_PM8606) ? chip->client : chip->companion; > data->port = pdev->id; > diff --git a/drivers/leds/leds-sunfire.c b/drivers/leds/leds-sunfire.c > index 8979299..388632d 100644 > --- a/drivers/leds/leds-sunfire.c > +++ b/drivers/leds/leds-sunfire.c > @@ -159,14 +159,14 @@ static int sunfire_led_generic_probe(struct platform_device *pdev, > } > } > > - dev_set_drvdata(&pdev->dev, p); > + platform_set_drvdata(pdev, p); > > return 0; > } > > static int sunfire_led_generic_remove(struct platform_device *pdev) > { > - struct sunfire_drvdata *p = dev_get_drvdata(&pdev->dev); > + struct sunfire_drvdata *p = platform_get_drvdata(pdev); > int i; > > for (i = 0; i < NUM_LEDS_PER_BOARD; i++) > diff --git a/drivers/leds/leds-wm831x-status.c b/drivers/leds/leds-wm831x-status.c > index 6bd5c67..120815a 100644 > --- a/drivers/leds/leds-wm831x-status.c > +++ b/drivers/leds/leds-wm831x-status.c > @@ -241,7 +241,7 @@ static int wm831x_status_probe(struct platform_device *pdev) > GFP_KERNEL); > if (!drvdata) > return -ENOMEM; > - dev_set_drvdata(&pdev->dev, drvdata); > + platform_set_drvdata(pdev, drvdata); > > drvdata->wm831x = wm831x; > drvdata->reg = res->start; > -- > 1.7.10.4 > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-leds" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-leds" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html