diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-07-22 18:04:30 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-07-24 11:58:22 -0400 |
commit | cd4cd7306a403f62ef3ca783b9d1cf2a03e595ed (patch) | |
tree | 2eceb6990f5a0097f158c91316ee93fc2db5282d /arch/sparc/kernel/sbus.c | |
parent | a454dc50590c6d758abba016a303a221f2f1b4b8 (diff) |
sparc: 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>
Acked-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/sbus.c')
-rw-r--r-- | arch/sparc/kernel/sbus.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/sparc/kernel/sbus.c b/arch/sparc/kernel/sbus.c index cfeaf04b9cdf..2ca32d13abcf 100644 --- a/arch/sparc/kernel/sbus.c +++ b/arch/sparc/kernel/sbus.c | |||
@@ -57,7 +57,7 @@ | |||
57 | void sbus_set_sbus64(struct device *dev, int bursts) | 57 | void sbus_set_sbus64(struct device *dev, int bursts) |
58 | { | 58 | { |
59 | struct iommu *iommu = dev->archdata.iommu; | 59 | struct iommu *iommu = dev->archdata.iommu; |
60 | struct of_device *op = to_of_device(dev); | 60 | struct platform_device *op = to_platform_device(dev); |
61 | const struct linux_prom_registers *regs; | 61 | const struct linux_prom_registers *regs; |
62 | unsigned long cfg_reg; | 62 | unsigned long cfg_reg; |
63 | int slot; | 63 | int slot; |
@@ -204,7 +204,7 @@ static unsigned long sysio_imap_to_iclr(unsigned long imap) | |||
204 | return imap + diff; | 204 | return imap + diff; |
205 | } | 205 | } |
206 | 206 | ||
207 | static unsigned int sbus_build_irq(struct of_device *op, unsigned int ino) | 207 | static unsigned int sbus_build_irq(struct platform_device *op, unsigned int ino) |
208 | { | 208 | { |
209 | struct iommu *iommu = op->dev.archdata.iommu; | 209 | struct iommu *iommu = op->dev.archdata.iommu; |
210 | unsigned long reg_base = iommu->write_complete_reg - 0x2000UL; | 210 | unsigned long reg_base = iommu->write_complete_reg - 0x2000UL; |
@@ -267,7 +267,7 @@ static unsigned int sbus_build_irq(struct of_device *op, unsigned int ino) | |||
267 | #define SYSIO_UEAFSR_RESV2 0x0000001fffffffffUL /* Reserved */ | 267 | #define SYSIO_UEAFSR_RESV2 0x0000001fffffffffUL /* Reserved */ |
268 | static irqreturn_t sysio_ue_handler(int irq, void *dev_id) | 268 | static irqreturn_t sysio_ue_handler(int irq, void *dev_id) |
269 | { | 269 | { |
270 | struct of_device *op = dev_id; | 270 | struct platform_device *op = dev_id; |
271 | struct iommu *iommu = op->dev.archdata.iommu; | 271 | struct iommu *iommu = op->dev.archdata.iommu; |
272 | unsigned long reg_base = iommu->write_complete_reg - 0x2000UL; | 272 | unsigned long reg_base = iommu->write_complete_reg - 0x2000UL; |
273 | unsigned long afsr_reg, afar_reg; | 273 | unsigned long afsr_reg, afar_reg; |
@@ -341,7 +341,7 @@ static irqreturn_t sysio_ue_handler(int irq, void *dev_id) | |||
341 | #define SYSIO_CEAFSR_RESV2 0x0000001fffffffffUL /* Reserved */ | 341 | #define SYSIO_CEAFSR_RESV2 0x0000001fffffffffUL /* Reserved */ |
342 | static irqreturn_t sysio_ce_handler(int irq, void *dev_id) | 342 | static irqreturn_t sysio_ce_handler(int irq, void *dev_id) |
343 | { | 343 | { |
344 | struct of_device *op = dev_id; | 344 | struct platform_device *op = dev_id; |
345 | struct iommu *iommu = op->dev.archdata.iommu; | 345 | struct iommu *iommu = op->dev.archdata.iommu; |
346 | unsigned long reg_base = iommu->write_complete_reg - 0x2000UL; | 346 | unsigned long reg_base = iommu->write_complete_reg - 0x2000UL; |
347 | unsigned long afsr_reg, afar_reg; | 347 | unsigned long afsr_reg, afar_reg; |
@@ -420,7 +420,7 @@ static irqreturn_t sysio_ce_handler(int irq, void *dev_id) | |||
420 | #define SYSIO_SBAFSR_RESV3 0x0000001fffffffffUL /* Reserved */ | 420 | #define SYSIO_SBAFSR_RESV3 0x0000001fffffffffUL /* Reserved */ |
421 | static irqreturn_t sysio_sbus_error_handler(int irq, void *dev_id) | 421 | static irqreturn_t sysio_sbus_error_handler(int irq, void *dev_id) |
422 | { | 422 | { |
423 | struct of_device *op = dev_id; | 423 | struct platform_device *op = dev_id; |
424 | struct iommu *iommu = op->dev.archdata.iommu; | 424 | struct iommu *iommu = op->dev.archdata.iommu; |
425 | unsigned long afsr_reg, afar_reg, reg_base; | 425 | unsigned long afsr_reg, afar_reg, reg_base; |
426 | unsigned long afsr, afar, error_bits; | 426 | unsigned long afsr, afar, error_bits; |
@@ -488,7 +488,7 @@ static irqreturn_t sysio_sbus_error_handler(int irq, void *dev_id) | |||
488 | #define SYSIO_CE_INO 0x35 | 488 | #define SYSIO_CE_INO 0x35 |
489 | #define SYSIO_SBUSERR_INO 0x36 | 489 | #define SYSIO_SBUSERR_INO 0x36 |
490 | 490 | ||
491 | static void __init sysio_register_error_handlers(struct of_device *op) | 491 | static void __init sysio_register_error_handlers(struct platform_device *op) |
492 | { | 492 | { |
493 | struct iommu *iommu = op->dev.archdata.iommu; | 493 | struct iommu *iommu = op->dev.archdata.iommu; |
494 | unsigned long reg_base = iommu->write_complete_reg - 0x2000UL; | 494 | unsigned long reg_base = iommu->write_complete_reg - 0x2000UL; |
@@ -534,7 +534,7 @@ static void __init sysio_register_error_handlers(struct of_device *op) | |||
534 | } | 534 | } |
535 | 535 | ||
536 | /* Boot time initialization. */ | 536 | /* Boot time initialization. */ |
537 | static void __init sbus_iommu_init(struct of_device *op) | 537 | static void __init sbus_iommu_init(struct platform_device *op) |
538 | { | 538 | { |
539 | const struct linux_prom64_registers *pr; | 539 | const struct linux_prom64_registers *pr; |
540 | struct device_node *dp = op->dev.of_node; | 540 | struct device_node *dp = op->dev.of_node; |
@@ -663,7 +663,7 @@ static int __init sbus_init(void) | |||
663 | struct device_node *dp; | 663 | struct device_node *dp; |
664 | 664 | ||
665 | for_each_node_by_name(dp, "sbus") { | 665 | for_each_node_by_name(dp, "sbus") { |
666 | struct of_device *op = of_find_device_by_node(dp); | 666 | struct platform_device *op = of_find_device_by_node(dp); |
667 | 667 | ||
668 | sbus_iommu_init(op); | 668 | sbus_iommu_init(op); |
669 | of_propagate_archdata(op); | 669 | of_propagate_archdata(op); |