diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-05-23 14:35:23 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-30 16:46:15 +0400 |
commit | 9093ca8891e238adc323629d69aaae379fd38bb0 (patch) | |
tree | 948ddc6a63c685b400bfcaa297688917e42f1031 /drivers/misc/spear13xx_pcie_gadget.c | |
parent | c6148f8f8ceb18fd6ae3b637c56e8327b73873eb (diff) | |
download | linux-9093ca8891e238adc323629d69aaae379fd38bb0.tar.xz |
misc: use platform_{get,set}_drvdata()
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.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/spear13xx_pcie_gadget.c')
-rw-r--r-- | drivers/misc/spear13xx_pcie_gadget.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/spear13xx_pcie_gadget.c b/drivers/misc/spear13xx_pcie_gadget.c index 7deb25dc86a7..84a8dabc18fb 100644 --- a/drivers/misc/spear13xx_pcie_gadget.c +++ b/drivers/misc/spear13xx_pcie_gadget.c @@ -776,7 +776,7 @@ static int spear_pcie_gadget_probe(struct platform_device *pdev) goto err_iounmap_app; } - dev_set_drvdata(&pdev->dev, target); + platform_set_drvdata(pdev, target); irq = platform_get_irq(pdev, 0); if (irq < 0) { @@ -863,7 +863,7 @@ static int spear_pcie_gadget_remove(struct platform_device *pdev) res0 = platform_get_resource(pdev, IORESOURCE_MEM, 0); res1 = platform_get_resource(pdev, IORESOURCE_MEM, 1); irq = platform_get_irq(pdev, 0); - target = dev_get_drvdata(&pdev->dev); + target = platform_get_drvdata(pdev); config = &target->config; free_irq(irq, NULL); |