提交 4ddb8ae2 编写于 作者: J Jamie Iles 提交者: Grant Likely

basic_mmio_gpio: convert to platform_{get,set}_drvdata()

Use the platform drvdata helpers rather than working on the struct
device itself.
Signed-off-by: NJamie Iles <jamie@jamieiles.com>
Acked-by: NAnton Vorontsov <cbouatmailru@gmail.com>
Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
上级 8467afec
......@@ -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)
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册