diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-05-23 06:22:40 -0400 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2013-06-12 14:39:07 -0400 |
commit | c2c64954723b9d365f35f36c0cd089e740bb0a0a (patch) | |
tree | b8f63ac7cc85a2bec4b0609370e5eef3f01b8b69 /drivers/i2c/busses | |
parent | 3cc2d009bc210516c61536273b304c4f6ccd797c (diff) |
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')
-rw-r--r-- | drivers/i2c/busses/i2c-cpm.c | 4 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-ibm_iic.c | 4 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-mpc.c | 4 |
3 files changed, 6 insertions, 6 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) | |||
646 | 646 | ||
647 | cpm->ofdev = ofdev; | 647 | cpm->ofdev = ofdev; |
648 | 648 | ||
649 | dev_set_drvdata(&ofdev->dev, cpm); | 649 | platform_set_drvdata(ofdev, cpm); |
650 | 650 | ||
651 | cpm->adap = cpm_ops; | 651 | cpm->adap = cpm_ops; |
652 | i2c_set_adapdata(&cpm->adap, cpm); | 652 | i2c_set_adapdata(&cpm->adap, cpm); |
@@ -689,7 +689,7 @@ out_free: | |||
689 | 689 | ||
690 | static int cpm_i2c_remove(struct platform_device *ofdev) | 690 | static int cpm_i2c_remove(struct platform_device *ofdev) |
691 | { | 691 | { |
692 | struct cpm_i2c *cpm = dev_get_drvdata(&ofdev->dev); | 692 | struct cpm_i2c *cpm = platform_get_drvdata(ofdev); |
693 | 693 | ||
694 | i2c_del_adapter(&cpm->adap); | 694 | i2c_del_adapter(&cpm->adap); |
695 | 695 | ||
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) | |||
705 | return -ENOMEM; | 705 | return -ENOMEM; |
706 | } | 706 | } |
707 | 707 | ||
708 | dev_set_drvdata(&ofdev->dev, dev); | 708 | platform_set_drvdata(ofdev, dev); |
709 | 709 | ||
710 | dev->vaddr = of_iomap(np, 0); | 710 | dev->vaddr = of_iomap(np, 0); |
711 | if (dev->vaddr == NULL) { | 711 | if (dev->vaddr == NULL) { |
@@ -782,7 +782,7 @@ error_cleanup: | |||
782 | */ | 782 | */ |
783 | static int iic_remove(struct platform_device *ofdev) | 783 | static int iic_remove(struct platform_device *ofdev) |
784 | { | 784 | { |
785 | struct ibm_iic_private *dev = dev_get_drvdata(&ofdev->dev); | 785 | struct ibm_iic_private *dev = platform_get_drvdata(ofdev); |
786 | 786 | ||
787 | i2c_del_adapter(&dev->adap); | 787 | i2c_del_adapter(&dev->adap); |
788 | 788 | ||
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c index 5e705ee02f4a..7607dc061918 100644 --- a/drivers/i2c/busses/i2c-mpc.c +++ b/drivers/i2c/busses/i2c-mpc.c | |||
@@ -679,7 +679,7 @@ static int fsl_i2c_probe(struct platform_device *op) | |||
679 | } | 679 | } |
680 | dev_info(i2c->dev, "timeout %u us\n", mpc_ops.timeout * 1000000 / HZ); | 680 | dev_info(i2c->dev, "timeout %u us\n", mpc_ops.timeout * 1000000 / HZ); |
681 | 681 | ||
682 | dev_set_drvdata(&op->dev, i2c); | 682 | platform_set_drvdata(op, i2c); |
683 | 683 | ||
684 | i2c->adap = mpc_ops; | 684 | i2c->adap = mpc_ops; |
685 | i2c_set_adapdata(&i2c->adap, i2c); | 685 | i2c_set_adapdata(&i2c->adap, i2c); |
@@ -707,7 +707,7 @@ static int fsl_i2c_probe(struct platform_device *op) | |||
707 | 707 | ||
708 | static int fsl_i2c_remove(struct platform_device *op) | 708 | static int fsl_i2c_remove(struct platform_device *op) |
709 | { | 709 | { |
710 | struct mpc_i2c *i2c = dev_get_drvdata(&op->dev); | 710 | struct mpc_i2c *i2c = platform_get_drvdata(op); |
711 | 711 | ||
712 | i2c_del_adapter(&i2c->adap); | 712 | i2c_del_adapter(&i2c->adap); |
713 | 713 | ||