Skip to content

Commit

Permalink
basic_mmio_gpio: convert to platform_{get,set}_drvdata()
Browse files Browse the repository at this point in the history
Use the platform drvdata helpers rather than working on the struct
device itself.

Signed-off-by: Jamie Iles <jamie@jamieiles.com>
Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
  • Loading branch information
Jamie Iles authored and Grant Likely committed May 20, 2011
1 parent 8467afe commit 4ddb8ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpio/basic_mmio_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ static int __devinit bgpio_probe(struct platform_device *pdev)
else
bgc->gc.base = -1;

dev_set_drvdata(dev, bgc);
platform_set_drvdata(pdev, bgc);

ret = gpiochip_add(&bgc->gc);
if (ret)
Expand All @@ -307,7 +307,7 @@ static int __devinit bgpio_probe(struct platform_device *pdev)

static int __devexit bgpio_remove(struct platform_device *pdev)
{
struct bgpio_chip *bgc = dev_get_drvdata(&pdev->dev);
struct bgpio_chip *bgc = platform_get_drvdata(pdev);

return gpiochip_remove(&bgc->gc);
}
Expand Down

0 comments on commit 4ddb8ae

Please sign in to comment.