summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-cpm.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-05-23 12:22:40 +0200
committerWolfram Sang <wsa@the-dreams.de>2013-06-12 20:39:07 +0200
commitc2c64954723b9d365f35f36c0cd089e740bb0a0a (patch)
treeb8f63ac7cc85a2bec4b0609370e5eef3f01b8b69 /drivers/i2c/busses/i2c-cpm.c
parentdrivers/i2c/busses: don't check resource with devm_ioremap_resource (diff)
downloadlinux-c2c64954723b9d365f35f36c0cd089e740bb0a0a.tar.xz
linux-c2c64954723b9d365f35f36c0cd089e740bb0a0a.zip
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-cpm.c')
-rw-r--r--drivers/i2c/busses/i2c-cpm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-cpm.c b/drivers/i2c/busses/i2c-cpm.c
index 3823623baa48..eccf5c2d4a12 100644
--- a/drivers/i2c/busses/i2c-cpm.c
+++ b/drivers/i2c/busses/i2c-cpm.c
@@ -646,7 +646,7 @@ static int cpm_i2c_probe(struct platform_device *ofdev)
cpm->ofdev = ofdev;
- dev_set_drvdata(&ofdev->dev, cpm);
+ platform_set_drvdata(ofdev, cpm);
cpm->adap = cpm_ops;
i2c_set_adapdata(&cpm->adap, cpm);
@@ -689,7 +689,7 @@ out_free:
static int cpm_i2c_remove(struct platform_device *ofdev)
{
- struct cpm_i2c *cpm = dev_get_drvdata(&ofdev->dev);
+ struct cpm_i2c *cpm = platform_get_drvdata(ofdev);
i2c_del_adapter(&cpm->adap);