diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-05-23 14:22:40 +0400 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2013-06-12 22:39:07 +0400 |
commit | c2c64954723b9d365f35f36c0cd089e740bb0a0a (patch) | |
tree | b8f63ac7cc85a2bec4b0609370e5eef3f01b8b69 /drivers/i2c/busses/i2c-ibm_iic.c | |
parent | 3cc2d009bc210516c61536273b304c4f6ccd797c (diff) | |
download | linux-c2c64954723b9d365f35f36c0cd089e740bb0a0a.tar.xz |
i2c: 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: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-ibm_iic.c')
-rw-r--r-- | drivers/i2c/busses/i2c-ibm_iic.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c index 405a2e240454..973f51688276 100644 --- a/drivers/i2c/busses/i2c-ibm_iic.c +++ b/drivers/i2c/busses/i2c-ibm_iic.c @@ -705,7 +705,7 @@ static int iic_probe(struct platform_device *ofdev) return -ENOMEM; } - dev_set_drvdata(&ofdev->dev, dev); + platform_set_drvdata(ofdev, dev); dev->vaddr = of_iomap(np, 0); if (dev->vaddr == NULL) { @@ -782,7 +782,7 @@ error_cleanup: */ static int iic_remove(struct platform_device *ofdev) { - struct ibm_iic_private *dev = dev_get_drvdata(&ofdev->dev); + struct ibm_iic_private *dev = platform_get_drvdata(ofdev); i2c_del_adapter(&dev->adap); |