aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-cpm.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2010-08-06 11:25:50 -0400
committerGrant Likely <grant.likely@secretlab.ca>2010-08-06 11:25:50 -0400
commit2dc11581376829303b98eadb2de253bee065a56a (patch)
treedbce62559c822cd720d1819a50c488bfecdfa945 /drivers/i2c/busses/i2c-cpm.c
parentfc1caf6eafb30ea185720e29f7f5eccca61ecd60 (diff)
of/device: Replace struct of_device with struct platform_device
of_device is just an alias for platform_device, so remove it entirely. Also replace to_of_device() with to_platform_device() and update comment blocks. This patch was initially generated from the following semantic patch, and then edited by hand to pick up the bits that coccinelle didn't catch. @@ @@ -struct of_device +struct platform_device Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Reviewed-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/i2c/busses/i2c-cpm.c')
-rw-r--r--drivers/i2c/busses/i2c-cpm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-cpm.c b/drivers/i2c/busses/i2c-cpm.c
index e591de1bc70..f7bd2613cec 100644
--- a/drivers/i2c/busses/i2c-cpm.c
+++ b/drivers/i2c/busses/i2c-cpm.c
@@ -105,7 +105,7 @@ struct i2c_reg {
105 105
106struct cpm_i2c { 106struct cpm_i2c {
107 char *base; 107 char *base;
108 struct of_device *ofdev; 108 struct platform_device *ofdev;
109 struct i2c_adapter adap; 109 struct i2c_adapter adap;
110 uint dp_addr; 110 uint dp_addr;
111 int version; /* CPM1=1, CPM2=2 */ 111 int version; /* CPM1=1, CPM2=2 */
@@ -428,7 +428,7 @@ static const struct i2c_adapter cpm_ops = {
428 428
429static int __devinit cpm_i2c_setup(struct cpm_i2c *cpm) 429static int __devinit cpm_i2c_setup(struct cpm_i2c *cpm)
430{ 430{
431 struct of_device *ofdev = cpm->ofdev; 431 struct platform_device *ofdev = cpm->ofdev;
432 const u32 *data; 432 const u32 *data;
433 int len, ret, i; 433 int len, ret, i;
434 void __iomem *i2c_base; 434 void __iomem *i2c_base;
@@ -634,7 +634,7 @@ static void cpm_i2c_shutdown(struct cpm_i2c *cpm)
634 cpm_muram_free(cpm->i2c_addr); 634 cpm_muram_free(cpm->i2c_addr);
635} 635}
636 636
637static int __devinit cpm_i2c_probe(struct of_device *ofdev, 637static int __devinit cpm_i2c_probe(struct platform_device *ofdev,
638 const struct of_device_id *match) 638 const struct of_device_id *match)
639{ 639{
640 int result, len; 640 int result, len;
@@ -687,7 +687,7 @@ out_free:
687 return result; 687 return result;
688} 688}
689 689
690static int __devexit cpm_i2c_remove(struct of_device *ofdev) 690static int __devexit cpm_i2c_remove(struct platform_device *ofdev)
691{ 691{
692 struct cpm_i2c *cpm = dev_get_drvdata(&ofdev->dev); 692 struct cpm_i2c *cpm = dev_get_drvdata(&ofdev->dev);
693 693