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>
else
bgc->gc.base = -1;
- dev_set_drvdata(dev, bgc);
+ platform_set_drvdata(pdev, bgc);
ret = gpiochip_add(&bgc->gc);
if (ret)
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);
}