diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-07-22 17:52:34 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-07-24 11:58:21 -0400 |
commit | a454dc50590c6d758abba016a303a221f2f1b4b8 (patch) | |
tree | 052fde0b724165c6eff3253d795221ef59f069cc /arch/powerpc/sysdev | |
parent | 94a0cb1fc61ab7a0d47d268a7764374efeb2160b (diff) |
powerpc: remove references to of_device and to_of_device
of_device is just a #define alias to platform_device. This patch
replaces all references to it with platform_device.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r-- | arch/powerpc/sysdev/axonram.c | 12 | ||||
-rw-r--r-- | arch/powerpc/sysdev/bestcomm/bestcomm.c | 7 | ||||
-rw-r--r-- | arch/powerpc/sysdev/fsl_msi.c | 4 | ||||
-rw-r--r-- | arch/powerpc/sysdev/fsl_pmc.c | 3 | ||||
-rw-r--r-- | arch/powerpc/sysdev/fsl_rio.c | 4 | ||||
-rw-r--r-- | arch/powerpc/sysdev/pmi.c | 6 | ||||
-rw-r--r-- | arch/powerpc/sysdev/qe_lib/qe.c | 5 |
7 files changed, 21 insertions, 20 deletions
diff --git a/arch/powerpc/sysdev/axonram.c b/arch/powerpc/sysdev/axonram.c index 402d2212162f..2659a60bd7b8 100644 --- a/arch/powerpc/sysdev/axonram.c +++ b/arch/powerpc/sysdev/axonram.c | |||
@@ -60,7 +60,7 @@ | |||
60 | static int azfs_major, azfs_minor; | 60 | static int azfs_major, azfs_minor; |
61 | 61 | ||
62 | struct axon_ram_bank { | 62 | struct axon_ram_bank { |
63 | struct of_device *device; | 63 | struct platform_device *device; |
64 | struct gendisk *disk; | 64 | struct gendisk *disk; |
65 | unsigned int irq_id; | 65 | unsigned int irq_id; |
66 | unsigned long ph_addr; | 66 | unsigned long ph_addr; |
@@ -72,7 +72,7 @@ struct axon_ram_bank { | |||
72 | static ssize_t | 72 | static ssize_t |
73 | axon_ram_sysfs_ecc(struct device *dev, struct device_attribute *attr, char *buf) | 73 | axon_ram_sysfs_ecc(struct device *dev, struct device_attribute *attr, char *buf) |
74 | { | 74 | { |
75 | struct of_device *device = to_of_device(dev); | 75 | struct platform_device *device = to_platform_device(dev); |
76 | struct axon_ram_bank *bank = device->dev.platform_data; | 76 | struct axon_ram_bank *bank = device->dev.platform_data; |
77 | 77 | ||
78 | BUG_ON(!bank); | 78 | BUG_ON(!bank); |
@@ -90,7 +90,7 @@ static DEVICE_ATTR(ecc, S_IRUGO, axon_ram_sysfs_ecc, NULL); | |||
90 | static irqreturn_t | 90 | static irqreturn_t |
91 | axon_ram_irq_handler(int irq, void *dev) | 91 | axon_ram_irq_handler(int irq, void *dev) |
92 | { | 92 | { |
93 | struct of_device *device = dev; | 93 | struct platform_device *device = dev; |
94 | struct axon_ram_bank *bank = device->dev.platform_data; | 94 | struct axon_ram_bank *bank = device->dev.platform_data; |
95 | 95 | ||
96 | BUG_ON(!bank); | 96 | BUG_ON(!bank); |
@@ -174,8 +174,8 @@ static const struct block_device_operations axon_ram_devops = { | |||
174 | * axon_ram_probe - probe() method for platform driver | 174 | * axon_ram_probe - probe() method for platform driver |
175 | * @device, @device_id: see of_platform_driver method | 175 | * @device, @device_id: see of_platform_driver method |
176 | */ | 176 | */ |
177 | static int | 177 | static int axon_ram_probe(struct platform_device *device, |
178 | axon_ram_probe(struct of_device *device, const struct of_device_id *device_id) | 178 | const struct of_device_id *device_id) |
179 | { | 179 | { |
180 | static int axon_ram_bank_id = -1; | 180 | static int axon_ram_bank_id = -1; |
181 | struct axon_ram_bank *bank; | 181 | struct axon_ram_bank *bank; |
@@ -304,7 +304,7 @@ failed: | |||
304 | * @device: see of_platform_driver method | 304 | * @device: see of_platform_driver method |
305 | */ | 305 | */ |
306 | static int | 306 | static int |
307 | axon_ram_remove(struct of_device *device) | 307 | axon_ram_remove(struct platform_device *device) |
308 | { | 308 | { |
309 | struct axon_ram_bank *bank = device->dev.platform_data; | 309 | struct axon_ram_bank *bank = device->dev.platform_data; |
310 | 310 | ||
diff --git a/arch/powerpc/sysdev/bestcomm/bestcomm.c b/arch/powerpc/sysdev/bestcomm/bestcomm.c index a7c5c470af14..650256115064 100644 --- a/arch/powerpc/sysdev/bestcomm/bestcomm.c +++ b/arch/powerpc/sysdev/bestcomm/bestcomm.c | |||
@@ -365,8 +365,8 @@ bcom_engine_cleanup(void) | |||
365 | /* OF platform driver */ | 365 | /* OF platform driver */ |
366 | /* ======================================================================== */ | 366 | /* ======================================================================== */ |
367 | 367 | ||
368 | static int __devinit | 368 | static int __devinit mpc52xx_bcom_probe(struct platform_device *op, |
369 | mpc52xx_bcom_probe(struct of_device *op, const struct of_device_id *match) | 369 | const struct of_device_id *match) |
370 | { | 370 | { |
371 | struct device_node *ofn_sram; | 371 | struct device_node *ofn_sram; |
372 | struct resource res_bcom; | 372 | struct resource res_bcom; |
@@ -461,8 +461,7 @@ error_ofput: | |||
461 | } | 461 | } |
462 | 462 | ||
463 | 463 | ||
464 | static int | 464 | static int mpc52xx_bcom_remove(struct platform_device *op) |
465 | mpc52xx_bcom_remove(struct of_device *op) | ||
466 | { | 465 | { |
467 | /* Clean up the engine */ | 466 | /* Clean up the engine */ |
468 | bcom_engine_cleanup(); | 467 | bcom_engine_cleanup(); |
diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c index 962c2d8dd8d9..87991d3abbab 100644 --- a/arch/powerpc/sysdev/fsl_msi.c +++ b/arch/powerpc/sysdev/fsl_msi.c | |||
@@ -250,7 +250,7 @@ unlock: | |||
250 | raw_spin_unlock(&desc->lock); | 250 | raw_spin_unlock(&desc->lock); |
251 | } | 251 | } |
252 | 252 | ||
253 | static int fsl_of_msi_remove(struct of_device *ofdev) | 253 | static int fsl_of_msi_remove(struct platform_device *ofdev) |
254 | { | 254 | { |
255 | struct fsl_msi *msi = ofdev->dev.platform_data; | 255 | struct fsl_msi *msi = ofdev->dev.platform_data; |
256 | int virq, i; | 256 | int virq, i; |
@@ -274,7 +274,7 @@ static int fsl_of_msi_remove(struct of_device *ofdev) | |||
274 | return 0; | 274 | return 0; |
275 | } | 275 | } |
276 | 276 | ||
277 | static int __devinit fsl_of_msi_probe(struct of_device *dev, | 277 | static int __devinit fsl_of_msi_probe(struct platform_device *dev, |
278 | const struct of_device_id *match) | 278 | const struct of_device_id *match) |
279 | { | 279 | { |
280 | struct fsl_msi *msi; | 280 | struct fsl_msi *msi; |
diff --git a/arch/powerpc/sysdev/fsl_pmc.c b/arch/powerpc/sysdev/fsl_pmc.c index 9082eb921ad9..44de8559c975 100644 --- a/arch/powerpc/sysdev/fsl_pmc.c +++ b/arch/powerpc/sysdev/fsl_pmc.c | |||
@@ -58,7 +58,8 @@ static struct platform_suspend_ops pmc_suspend_ops = { | |||
58 | .enter = pmc_suspend_enter, | 58 | .enter = pmc_suspend_enter, |
59 | }; | 59 | }; |
60 | 60 | ||
61 | static int pmc_probe(struct of_device *ofdev, const struct of_device_id *id) | 61 | static int pmc_probe(struct platform_device *ofdev, |
62 | const struct of_device_id *id) | ||
62 | { | 63 | { |
63 | pmc_regs = of_iomap(ofdev->dev.of_node, 0); | 64 | pmc_regs = of_iomap(ofdev->dev.of_node, 0); |
64 | if (!pmc_regs) | 65 | if (!pmc_regs) |
diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c index 30e1626b2e85..8bd86530ee25 100644 --- a/arch/powerpc/sysdev/fsl_rio.c +++ b/arch/powerpc/sysdev/fsl_rio.c | |||
@@ -1338,7 +1338,7 @@ static inline void fsl_rio_info(struct device *dev, u32 ccsr) | |||
1338 | * master port with system-specific info, and registers the | 1338 | * master port with system-specific info, and registers the |
1339 | * master port with the RapidIO subsystem. | 1339 | * master port with the RapidIO subsystem. |
1340 | */ | 1340 | */ |
1341 | int fsl_rio_setup(struct of_device *dev) | 1341 | int fsl_rio_setup(struct platform_device *dev) |
1342 | { | 1342 | { |
1343 | struct rio_ops *ops; | 1343 | struct rio_ops *ops; |
1344 | struct rio_mport *port; | 1344 | struct rio_mport *port; |
@@ -1536,7 +1536,7 @@ err_ops: | |||
1536 | 1536 | ||
1537 | /* The probe function for RapidIO peer-to-peer network. | 1537 | /* The probe function for RapidIO peer-to-peer network. |
1538 | */ | 1538 | */ |
1539 | static int __devinit fsl_of_rio_rpn_probe(struct of_device *dev, | 1539 | static int __devinit fsl_of_rio_rpn_probe(struct platform_device *dev, |
1540 | const struct of_device_id *match) | 1540 | const struct of_device_id *match) |
1541 | { | 1541 | { |
1542 | int rc; | 1542 | int rc; |
diff --git a/arch/powerpc/sysdev/pmi.c b/arch/powerpc/sysdev/pmi.c index d07137a07d75..24a0bb955b18 100644 --- a/arch/powerpc/sysdev/pmi.c +++ b/arch/powerpc/sysdev/pmi.c | |||
@@ -43,7 +43,7 @@ struct pmi_data { | |||
43 | struct mutex msg_mutex; | 43 | struct mutex msg_mutex; |
44 | pmi_message_t msg; | 44 | pmi_message_t msg; |
45 | struct completion *completion; | 45 | struct completion *completion; |
46 | struct of_device *dev; | 46 | struct platform_device *dev; |
47 | int irq; | 47 | int irq; |
48 | u8 __iomem *pmi_reg; | 48 | u8 __iomem *pmi_reg; |
49 | struct work_struct work; | 49 | struct work_struct work; |
@@ -121,7 +121,7 @@ static void pmi_notify_handlers(struct work_struct *work) | |||
121 | spin_unlock(&data->handler_spinlock); | 121 | spin_unlock(&data->handler_spinlock); |
122 | } | 122 | } |
123 | 123 | ||
124 | static int pmi_of_probe(struct of_device *dev, | 124 | static int pmi_of_probe(struct platform_device *dev, |
125 | const struct of_device_id *match) | 125 | const struct of_device_id *match) |
126 | { | 126 | { |
127 | struct device_node *np = dev->dev.of_node; | 127 | struct device_node *np = dev->dev.of_node; |
@@ -185,7 +185,7 @@ out: | |||
185 | return rc; | 185 | return rc; |
186 | } | 186 | } |
187 | 187 | ||
188 | static int pmi_of_remove(struct of_device *dev) | 188 | static int pmi_of_remove(struct platform_device *dev) |
189 | { | 189 | { |
190 | struct pmi_handler *handler, *tmp; | 190 | struct pmi_handler *handler, *tmp; |
191 | 191 | ||
diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c index 093e0ae1a941..3da8014931c9 100644 --- a/arch/powerpc/sysdev/qe_lib/qe.c +++ b/arch/powerpc/sysdev/qe_lib/qe.c | |||
@@ -651,14 +651,15 @@ unsigned int qe_get_num_of_snums(void) | |||
651 | EXPORT_SYMBOL(qe_get_num_of_snums); | 651 | EXPORT_SYMBOL(qe_get_num_of_snums); |
652 | 652 | ||
653 | #if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC_85xx) | 653 | #if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC_85xx) |
654 | static int qe_resume(struct of_device *ofdev) | 654 | static int qe_resume(struct platform_device *ofdev) |
655 | { | 655 | { |
656 | if (!qe_alive_during_sleep()) | 656 | if (!qe_alive_during_sleep()) |
657 | qe_reset(); | 657 | qe_reset(); |
658 | return 0; | 658 | return 0; |
659 | } | 659 | } |
660 | 660 | ||
661 | static int qe_probe(struct of_device *ofdev, const struct of_device_id *id) | 661 | static int qe_probe(struct platform_device *ofdev, |
662 | const struct of_device_id *id) | ||
662 | { | 663 | { |
663 | return 0; | 664 | return 0; |
664 | } | 665 | } |