diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-08-06 11:25:50 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-08-06 11:25:50 -0400 |
commit | 2dc11581376829303b98eadb2de253bee065a56a (patch) | |
tree | dbce62559c822cd720d1819a50c488bfecdfa945 /drivers/mtd/maps | |
parent | fc1caf6eafb30ea185720e29f7f5eccca61ecd60 (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/mtd/maps')
-rw-r--r-- | drivers/mtd/maps/physmap_of.c | 8 | ||||
-rw-r--r-- | drivers/mtd/maps/sun_uflash.c | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c index ba124baa646d..8f9bab8dc8da 100644 --- a/drivers/mtd/maps/physmap_of.c +++ b/drivers/mtd/maps/physmap_of.c | |||
@@ -43,7 +43,7 @@ struct of_flash { | |||
43 | #ifdef CONFIG_MTD_PARTITIONS | 43 | #ifdef CONFIG_MTD_PARTITIONS |
44 | #define OF_FLASH_PARTS(info) ((info)->parts) | 44 | #define OF_FLASH_PARTS(info) ((info)->parts) |
45 | 45 | ||
46 | static int parse_obsolete_partitions(struct of_device *dev, | 46 | static int parse_obsolete_partitions(struct platform_device *dev, |
47 | struct of_flash *info, | 47 | struct of_flash *info, |
48 | struct device_node *dp) | 48 | struct device_node *dp) |
49 | { | 49 | { |
@@ -93,7 +93,7 @@ static int parse_obsolete_partitions(struct of_device *dev, | |||
93 | #define parse_partitions(info, dev) (0) | 93 | #define parse_partitions(info, dev) (0) |
94 | #endif /* MTD_PARTITIONS */ | 94 | #endif /* MTD_PARTITIONS */ |
95 | 95 | ||
96 | static int of_flash_remove(struct of_device *dev) | 96 | static int of_flash_remove(struct platform_device *dev) |
97 | { | 97 | { |
98 | struct of_flash *info; | 98 | struct of_flash *info; |
99 | int i; | 99 | int i; |
@@ -140,7 +140,7 @@ static int of_flash_remove(struct of_device *dev) | |||
140 | /* Helper function to handle probing of the obsolete "direct-mapped" | 140 | /* Helper function to handle probing of the obsolete "direct-mapped" |
141 | * compatible binding, which has an extra "probe-type" property | 141 | * compatible binding, which has an extra "probe-type" property |
142 | * describing the type of flash probe necessary. */ | 142 | * describing the type of flash probe necessary. */ |
143 | static struct mtd_info * __devinit obsolete_probe(struct of_device *dev, | 143 | static struct mtd_info * __devinit obsolete_probe(struct platform_device *dev, |
144 | struct map_info *map) | 144 | struct map_info *map) |
145 | { | 145 | { |
146 | struct device_node *dp = dev->dev.of_node; | 146 | struct device_node *dp = dev->dev.of_node; |
@@ -215,7 +215,7 @@ static void __devinit of_free_probes(const char **probes) | |||
215 | } | 215 | } |
216 | #endif | 216 | #endif |
217 | 217 | ||
218 | static int __devinit of_flash_probe(struct of_device *dev, | 218 | static int __devinit of_flash_probe(struct platform_device *dev, |
219 | const struct of_device_id *match) | 219 | const struct of_device_id *match) |
220 | { | 220 | { |
221 | #ifdef CONFIG_MTD_PARTITIONS | 221 | #ifdef CONFIG_MTD_PARTITIONS |
diff --git a/drivers/mtd/maps/sun_uflash.c b/drivers/mtd/maps/sun_uflash.c index 8984236a8d0a..3582ba1f9b09 100644 --- a/drivers/mtd/maps/sun_uflash.c +++ b/drivers/mtd/maps/sun_uflash.c | |||
@@ -48,7 +48,7 @@ struct map_info uflash_map_templ = { | |||
48 | .bankwidth = UFLASH_BUSWIDTH, | 48 | .bankwidth = UFLASH_BUSWIDTH, |
49 | }; | 49 | }; |
50 | 50 | ||
51 | int uflash_devinit(struct of_device *op, struct device_node *dp) | 51 | int uflash_devinit(struct platform_device *op, struct device_node *dp) |
52 | { | 52 | { |
53 | struct uflash_dev *up; | 53 | struct uflash_dev *up; |
54 | 54 | ||
@@ -108,7 +108,7 @@ int uflash_devinit(struct of_device *op, struct device_node *dp) | |||
108 | return 0; | 108 | return 0; |
109 | } | 109 | } |
110 | 110 | ||
111 | static int __devinit uflash_probe(struct of_device *op, const struct of_device_id *match) | 111 | static int __devinit uflash_probe(struct platform_device *op, const struct of_device_id *match) |
112 | { | 112 | { |
113 | struct device_node *dp = op->dev.of_node; | 113 | struct device_node *dp = op->dev.of_node; |
114 | 114 | ||
@@ -121,7 +121,7 @@ static int __devinit uflash_probe(struct of_device *op, const struct of_device_i | |||
121 | return uflash_devinit(op, dp); | 121 | return uflash_devinit(op, dp); |
122 | } | 122 | } |
123 | 123 | ||
124 | static int __devexit uflash_remove(struct of_device *op) | 124 | static int __devexit uflash_remove(struct platform_device *op) |
125 | { | 125 | { |
126 | struct uflash_dev *up = dev_get_drvdata(&op->dev); | 126 | struct uflash_dev *up = dev_get_drvdata(&op->dev); |
127 | 127 | ||