Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+75 -74
+1 -1
arch/sparc/include/asm/prom.h
··· 57 57 58 58 /* These routines are here to provide compatibility with how powerpc 59 59 * handles IRQ mapping for OF device nodes. We precompute and permanently 60 - * register them in the of_device objects, whereas powerpc computes them 60 + * register them in the platform_device objects, whereas powerpc computes them 61 61 * on request. 62 62 */ 63 63 static inline void irq_dispose_mapping(unsigned int virq)
+2 -2
arch/sparc/kernel/apc.c
··· 68 68 #endif 69 69 } 70 70 71 - static inline void apc_free(struct of_device *op) 71 + static inline void apc_free(struct platform_device *op) 72 72 { 73 73 of_iounmap(&op->resource[0], regs, resource_size(&op->resource[0])); 74 74 } ··· 136 136 137 137 static struct miscdevice apc_miscdev = { APC_MINOR, APC_DEVNAME, &apc_fops }; 138 138 139 - static int __devinit apc_probe(struct of_device *op, 139 + static int __devinit apc_probe(struct platform_device *op, 140 140 const struct of_device_id *match) 141 141 { 142 142 int err;
+2 -1
arch/sparc/kernel/auxio_64.c
··· 102 102 103 103 MODULE_DEVICE_TABLE(of, auxio_match); 104 104 105 - static int __devinit auxio_probe(struct of_device *dev, const struct of_device_id *match) 105 + static int __devinit auxio_probe(struct platform_device *dev, 106 + const struct of_device_id *match) 106 107 { 107 108 struct device_node *dp = dev->dev.of_node; 108 109 unsigned long size;
+2 -2
arch/sparc/kernel/central.c
··· 59 59 } 60 60 } 61 61 62 - static int __devinit clock_board_probe(struct of_device *op, 62 + static int __devinit clock_board_probe(struct platform_device *op, 63 63 const struct of_device_id *match) 64 64 { 65 65 struct clock_board *p = kzalloc(sizeof(*p), GFP_KERNEL); ··· 157 157 }, 158 158 }; 159 159 160 - static int __devinit fhc_probe(struct of_device *op, 160 + static int __devinit fhc_probe(struct platform_device *op, 161 161 const struct of_device_id *match) 162 162 { 163 163 struct fhc *p = kzalloc(sizeof(*p), GFP_KERNEL);
+6 -6
arch/sparc/kernel/chmc.c
··· 392 392 } 393 393 } 394 394 395 - static int __devinit jbusmc_probe(struct of_device *op, 395 + static int __devinit jbusmc_probe(struct platform_device *op, 396 396 const struct of_device_id *match) 397 397 { 398 398 const struct linux_prom64_registers *mem_regs; ··· 690 690 chmc_read_mcreg(p, CHMCTRL_DECODE4)); 691 691 } 692 692 693 - static int __devinit chmc_probe(struct of_device *op, 693 + static int __devinit chmc_probe(struct platform_device *op, 694 694 const struct of_device_id *match) 695 695 { 696 696 struct device_node *dp = op->dev.of_node; ··· 765 765 goto out; 766 766 } 767 767 768 - static int __devinit us3mc_probe(struct of_device *op, 768 + static int __devinit us3mc_probe(struct platform_device *op, 769 769 const struct of_device_id *match) 770 770 { 771 771 if (mc_type == MC_TYPE_SAFARI) ··· 775 775 return -ENODEV; 776 776 } 777 777 778 - static void __devexit chmc_destroy(struct of_device *op, struct chmc *p) 778 + static void __devexit chmc_destroy(struct platform_device *op, struct chmc *p) 779 779 { 780 780 list_del(&p->list); 781 781 of_iounmap(&op->resource[0], p->regs, 0x48); 782 782 kfree(p); 783 783 } 784 784 785 - static void __devexit jbusmc_destroy(struct of_device *op, struct jbusmc *p) 785 + static void __devexit jbusmc_destroy(struct platform_device *op, struct jbusmc *p) 786 786 { 787 787 mc_list_del(&p->list); 788 788 of_iounmap(&op->resource[0], p->regs, JBUSMC_REGS_SIZE); 789 789 kfree(p); 790 790 } 791 791 792 - static int __devexit us3mc_remove(struct of_device *op) 792 + static int __devexit us3mc_remove(struct platform_device *op) 793 793 { 794 794 void *p = dev_get_drvdata(&op->dev); 795 795
+1 -1
arch/sparc/kernel/ioport.c
··· 253 253 static void *sbus_alloc_coherent(struct device *dev, size_t len, 254 254 dma_addr_t *dma_addrp, gfp_t gfp) 255 255 { 256 - struct of_device *op = to_of_device(dev); 256 + struct platform_device *op = to_platform_device(dev); 257 257 unsigned long len_total = (len + PAGE_SIZE-1) & PAGE_MASK; 258 258 unsigned long va; 259 259 struct resource *res;
+7 -7
arch/sparc/kernel/of_device_32.c
··· 241 241 242 242 static int of_resource_verbose; 243 243 244 - static void __init build_device_resources(struct of_device *op, 244 + static void __init build_device_resources(struct platform_device *op, 245 245 struct device *parent) 246 246 { 247 - struct of_device *p_op; 247 + struct platform_device *p_op; 248 248 struct of_bus *bus; 249 249 int na, ns; 250 250 int index, num_reg; ··· 253 253 if (!parent) 254 254 return; 255 255 256 - p_op = to_of_device(parent); 256 + p_op = to_platform_device(parent); 257 257 bus = of_match_bus(p_op->dev.of_node); 258 258 bus->count_cells(op->dev.of_node, &na, &ns); 259 259 ··· 335 335 } 336 336 } 337 337 338 - static struct of_device * __init scan_one_device(struct device_node *dp, 338 + static struct platform_device * __init scan_one_device(struct device_node *dp, 339 339 struct device *parent) 340 340 { 341 - struct of_device *op = kzalloc(sizeof(*op), GFP_KERNEL); 341 + struct platform_device *op = kzalloc(sizeof(*op), GFP_KERNEL); 342 342 const struct linux_prom_irqs *intr; 343 343 struct dev_archdata *sd; 344 344 int len, i; ··· 443 443 static void __init scan_tree(struct device_node *dp, struct device *parent) 444 444 { 445 445 while (dp) { 446 - struct of_device *op = scan_one_device(dp, parent); 446 + struct platform_device *op = scan_one_device(dp, parent); 447 447 448 448 if (op) 449 449 scan_tree(dp->child, &op->dev); ··· 455 455 static int __init scan_of_devices(void) 456 456 { 457 457 struct device_node *root = of_find_node_by_path("/"); 458 - struct of_device *parent; 458 + struct platform_device *parent; 459 459 460 460 parent = scan_one_device(root, NULL); 461 461 if (!parent)
+8 -8
arch/sparc/kernel/of_device_64.c
··· 310 310 311 311 static int of_resource_verbose; 312 312 313 - static void __init build_device_resources(struct of_device *op, 313 + static void __init build_device_resources(struct platform_device *op, 314 314 struct device *parent) 315 315 { 316 - struct of_device *p_op; 316 + struct platform_device *p_op; 317 317 struct of_bus *bus; 318 318 int na, ns; 319 319 int index, num_reg; ··· 322 322 if (!parent) 323 323 return; 324 324 325 - p_op = to_of_device(parent); 325 + p_op = to_platform_device(parent); 326 326 bus = of_match_bus(p_op->dev.of_node); 327 327 bus->count_cells(op->dev.of_node, &na, &ns); 328 328 ··· 528 528 529 529 static int of_irq_verbose; 530 530 531 - static unsigned int __init build_one_device_irq(struct of_device *op, 531 + static unsigned int __init build_one_device_irq(struct platform_device *op, 532 532 struct device *parent, 533 533 unsigned int irq) 534 534 { ··· 630 630 return irq; 631 631 } 632 632 633 - static struct of_device * __init scan_one_device(struct device_node *dp, 633 + static struct platform_device * __init scan_one_device(struct device_node *dp, 634 634 struct device *parent) 635 635 { 636 - struct of_device *op = kzalloc(sizeof(*op), GFP_KERNEL); 636 + struct platform_device *op = kzalloc(sizeof(*op), GFP_KERNEL); 637 637 const unsigned int *irq; 638 638 struct dev_archdata *sd; 639 639 int len, i; ··· 686 686 static void __init scan_tree(struct device_node *dp, struct device *parent) 687 687 { 688 688 while (dp) { 689 - struct of_device *op = scan_one_device(dp, parent); 689 + struct platform_device *op = scan_one_device(dp, parent); 690 690 691 691 if (op) 692 692 scan_tree(dp->child, &op->dev); ··· 698 698 static int __init scan_of_devices(void) 699 699 { 700 700 struct device_node *root = of_find_node_by_path("/"); 701 - struct of_device *parent; 701 + struct platform_device *parent; 702 702 703 703 parent = scan_one_device(root, NULL); 704 704 if (!parent)
+7 -7
arch/sparc/kernel/of_device_common.c
··· 13 13 14 14 static int node_match(struct device *dev, void *data) 15 15 { 16 - struct of_device *op = to_of_device(dev); 16 + struct platform_device *op = to_platform_device(dev); 17 17 struct device_node *dp = data; 18 18 19 19 return (op->dev.of_node == dp); 20 20 } 21 21 22 - struct of_device *of_find_device_by_node(struct device_node *dp) 22 + struct platform_device *of_find_device_by_node(struct device_node *dp) 23 23 { 24 24 struct device *dev = bus_find_device(&platform_bus_type, NULL, 25 25 dp, node_match); 26 26 27 27 if (dev) 28 - return to_of_device(dev); 28 + return to_platform_device(dev); 29 29 30 30 return NULL; 31 31 } ··· 33 33 34 34 unsigned int irq_of_parse_and_map(struct device_node *node, int index) 35 35 { 36 - struct of_device *op = of_find_device_by_node(node); 36 + struct platform_device *op = of_find_device_by_node(node); 37 37 38 38 if (!op || index >= op->archdata.num_irqs) 39 39 return 0; ··· 43 43 EXPORT_SYMBOL(irq_of_parse_and_map); 44 44 45 45 /* Take the archdata values for IOMMU, STC, and HOSTDATA found in 46 - * BUS and propagate to all child of_device objects. 46 + * BUS and propagate to all child platform_device objects. 47 47 */ 48 - void of_propagate_archdata(struct of_device *bus) 48 + void of_propagate_archdata(struct platform_device *bus) 49 49 { 50 50 struct dev_archdata *bus_sd = &bus->dev.archdata; 51 51 struct device_node *bus_dp = bus->dev.of_node; 52 52 struct device_node *dp; 53 53 54 54 for (dp = bus_dp->child; dp; dp = dp->sibling) { 55 - struct of_device *op = of_find_device_by_node(dp); 55 + struct platform_device *op = of_find_device_by_node(dp); 56 56 57 57 op->dev.archdata.iommu = bus_sd->iommu; 58 58 op->dev.archdata.stc = bus_sd->stc;
+2 -2
arch/sparc/kernel/pci.c
··· 198 198 * into physical address resources, we only have to figure out the register 199 199 * mapping. 200 200 */ 201 - static void pci_parse_of_addrs(struct of_device *op, 201 + static void pci_parse_of_addrs(struct platform_device *op, 202 202 struct device_node *node, 203 203 struct pci_dev *dev) 204 204 { ··· 248 248 { 249 249 struct dev_archdata *sd; 250 250 struct pci_slot *slot; 251 - struct of_device *op; 251 + struct platform_device *op; 252 252 struct pci_dev *dev; 253 253 const char *type; 254 254 u32 class;
+2 -2
arch/sparc/kernel/pci_fire.c
··· 410 410 } 411 411 412 412 static int __devinit pci_fire_pbm_init(struct pci_pbm_info *pbm, 413 - struct of_device *op, u32 portid) 413 + struct platform_device *op, u32 portid) 414 414 { 415 415 const struct linux_prom64_registers *regs; 416 416 struct device_node *dp = op->dev.of_node; ··· 455 455 return 0; 456 456 } 457 457 458 - static int __devinit fire_probe(struct of_device *op, 458 + static int __devinit fire_probe(struct platform_device *op, 459 459 const struct of_device_id *match) 460 460 { 461 461 struct device_node *dp = op->dev.of_node;
+1 -1
arch/sparc/kernel/pci_impl.h
··· 91 91 char *name; 92 92 93 93 /* OBP specific information. */ 94 - struct of_device *op; 94 + struct platform_device *op; 95 95 u64 ino_bitmap; 96 96 97 97 /* PBM I/O and Memory space resources. */
+3 -3
arch/sparc/kernel/pci_psycho.c
··· 285 285 #define PSYCHO_ECCCTRL_CE 0x2000000000000000UL /* Enable CE INterrupts */ 286 286 static void psycho_register_error_handlers(struct pci_pbm_info *pbm) 287 287 { 288 - struct of_device *op = of_find_device_by_node(pbm->op->dev.of_node); 288 + struct platform_device *op = of_find_device_by_node(pbm->op->dev.of_node); 289 289 unsigned long base = pbm->controller_regs; 290 290 u64 tmp; 291 291 int err; ··· 483 483 #define PSYCHO_MEMSPACE_SIZE 0x07fffffffUL 484 484 485 485 static void __devinit psycho_pbm_init(struct pci_pbm_info *pbm, 486 - struct of_device *op, int is_pbm_a) 486 + struct platform_device *op, int is_pbm_a) 487 487 { 488 488 psycho_pbm_init_common(pbm, op, "PSYCHO", PBM_CHIP_TYPE_PSYCHO); 489 489 psycho_pbm_strbuf_init(pbm, is_pbm_a); ··· 503 503 504 504 #define PSYCHO_CONFIGSPACE 0x001000000UL 505 505 506 - static int __devinit psycho_probe(struct of_device *op, 506 + static int __devinit psycho_probe(struct platform_device *op, 507 507 const struct of_device_id *match) 508 508 { 509 509 const struct linux_prom64_registers *pr_regs;
+3 -3
arch/sparc/kernel/pci_sabre.c
··· 311 311 static void sabre_register_error_handlers(struct pci_pbm_info *pbm) 312 312 { 313 313 struct device_node *dp = pbm->op->dev.of_node; 314 - struct of_device *op; 314 + struct platform_device *op; 315 315 unsigned long base = pbm->controller_regs; 316 316 u64 tmp; 317 317 int err; ··· 443 443 } 444 444 445 445 static void __devinit sabre_pbm_init(struct pci_pbm_info *pbm, 446 - struct of_device *op) 446 + struct platform_device *op) 447 447 { 448 448 psycho_pbm_init_common(pbm, op, "SABRE", PBM_CHIP_TYPE_SABRE); 449 449 pbm->pci_afsr = pbm->controller_regs + SABRE_PIOAFSR; ··· 452 452 sabre_scan_bus(pbm, &op->dev); 453 453 } 454 454 455 - static int __devinit sabre_probe(struct of_device *op, 455 + static int __devinit sabre_probe(struct platform_device *op, 456 456 const struct of_device_id *match) 457 457 { 458 458 const struct linux_prom64_registers *pr_regs;
+5 -5
arch/sparc/kernel/pci_schizo.c
··· 844 844 */ 845 845 static void tomatillo_register_error_handlers(struct pci_pbm_info *pbm) 846 846 { 847 - struct of_device *op = of_find_device_by_node(pbm->op->dev.of_node); 847 + struct platform_device *op = of_find_device_by_node(pbm->op->dev.of_node); 848 848 u64 tmp, err_mask, err_no_mask; 849 849 int err; 850 850 ··· 939 939 940 940 static void schizo_register_error_handlers(struct pci_pbm_info *pbm) 941 941 { 942 - struct of_device *op = of_find_device_by_node(pbm->op->dev.of_node); 942 + struct platform_device *op = of_find_device_by_node(pbm->op->dev.of_node); 943 943 u64 tmp, err_mask, err_no_mask; 944 944 int err; 945 945 ··· 1307 1307 } 1308 1308 1309 1309 static int __devinit schizo_pbm_init(struct pci_pbm_info *pbm, 1310 - struct of_device *op, u32 portid, 1310 + struct platform_device *op, u32 portid, 1311 1311 int chip_type) 1312 1312 { 1313 1313 const struct linux_prom64_registers *regs; ··· 1413 1413 return NULL; 1414 1414 } 1415 1415 1416 - static int __devinit __schizo_init(struct of_device *op, unsigned long chip_type) 1416 + static int __devinit __schizo_init(struct platform_device *op, unsigned long chip_type) 1417 1417 { 1418 1418 struct device_node *dp = op->dev.of_node; 1419 1419 struct pci_pbm_info *pbm; ··· 1460 1460 return err; 1461 1461 } 1462 1462 1463 - static int __devinit schizo_probe(struct of_device *op, 1463 + static int __devinit schizo_probe(struct platform_device *op, 1464 1464 const struct of_device_id *match) 1465 1465 { 1466 1466 return __schizo_init(op, (unsigned long) match->data);
+2 -2
arch/sparc/kernel/pci_sun4v.c
··· 879 879 #endif /* !(CONFIG_PCI_MSI) */ 880 880 881 881 static int __devinit pci_sun4v_pbm_init(struct pci_pbm_info *pbm, 882 - struct of_device *op, u32 devhandle) 882 + struct platform_device *op, u32 devhandle) 883 883 { 884 884 struct device_node *dp = op->dev.of_node; 885 885 int err; ··· 918 918 return 0; 919 919 } 920 920 921 - static int __devinit pci_sun4v_probe(struct of_device *op, 921 + static int __devinit pci_sun4v_probe(struct platform_device *op, 922 922 const struct of_device_id *match) 923 923 { 924 924 const struct linux_prom64_registers *regs;
+1 -1
arch/sparc/kernel/pmc.c
··· 51 51 #endif 52 52 } 53 53 54 - static int __devinit pmc_probe(struct of_device *op, 54 + static int __devinit pmc_probe(struct platform_device *op, 55 55 const struct of_device_id *match) 56 56 { 57 57 regs = of_ioremap(&op->resource[0], 0,
+1 -1
arch/sparc/kernel/power.c
··· 33 33 return 1; 34 34 } 35 35 36 - static int __devinit power_probe(struct of_device *op, const struct of_device_id *match) 36 + static int __devinit power_probe(struct platform_device *op, const struct of_device_id *match) 37 37 { 38 38 struct resource *res = &op->resource[0]; 39 39 unsigned int irq = op->archdata.irqs[0];
+1 -1
arch/sparc/kernel/prom_irqtrans.c
··· 719 719 void *_data) 720 720 { 721 721 struct device_node *central_dp = _data; 722 - struct of_device *central_op = of_find_device_by_node(central_dp); 722 + struct platform_device *central_op = of_find_device_by_node(central_dp); 723 723 struct resource *res; 724 724 unsigned long imap, iclr; 725 725 u32 tmp;
+1 -1
arch/sparc/kernel/psycho_common.c
··· 447 447 448 448 } 449 449 450 - void psycho_pbm_init_common(struct pci_pbm_info *pbm, struct of_device *op, 450 + void psycho_pbm_init_common(struct pci_pbm_info *pbm, struct platform_device *op, 451 451 const char *chip_name, int chip_type) 452 452 { 453 453 struct device_node *dp = op->dev.of_node;
+1 -1
arch/sparc/kernel/psycho_common.h
··· 42 42 unsigned long write_complete_offset); 43 43 44 44 extern void psycho_pbm_init_common(struct pci_pbm_info *pbm, 45 - struct of_device *op, 45 + struct platform_device *op, 46 46 const char *chip_name, int chip_type); 47 47 48 48 #endif /* _PSYCHO_COMMON_H */
+8 -8
arch/sparc/kernel/sbus.c
··· 57 57 void sbus_set_sbus64(struct device *dev, int bursts) 58 58 { 59 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 61 const struct linux_prom_registers *regs; 62 62 unsigned long cfg_reg; 63 63 int slot; ··· 204 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 209 struct iommu *iommu = op->dev.archdata.iommu; 210 210 unsigned long reg_base = iommu->write_complete_reg - 0x2000UL; ··· 267 267 #define SYSIO_UEAFSR_RESV2 0x0000001fffffffffUL /* Reserved */ 268 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 271 struct iommu *iommu = op->dev.archdata.iommu; 272 272 unsigned long reg_base = iommu->write_complete_reg - 0x2000UL; 273 273 unsigned long afsr_reg, afar_reg; ··· 341 341 #define SYSIO_CEAFSR_RESV2 0x0000001fffffffffUL /* Reserved */ 342 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 345 struct iommu *iommu = op->dev.archdata.iommu; 346 346 unsigned long reg_base = iommu->write_complete_reg - 0x2000UL; 347 347 unsigned long afsr_reg, afar_reg; ··· 420 420 #define SYSIO_SBAFSR_RESV3 0x0000001fffffffffUL /* Reserved */ 421 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 424 struct iommu *iommu = op->dev.archdata.iommu; 425 425 unsigned long afsr_reg, afar_reg, reg_base; 426 426 unsigned long afsr, afar, error_bits; ··· 488 488 #define SYSIO_CE_INO 0x35 489 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 493 struct iommu *iommu = op->dev.archdata.iommu; 494 494 unsigned long reg_base = iommu->write_complete_reg - 0x2000UL; ··· 534 534 } 535 535 536 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 539 const struct linux_prom64_registers *pr; 540 540 struct device_node *dp = op->dev.of_node; ··· 663 663 struct device_node *dp; 664 664 665 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 668 sbus_iommu_init(op); 669 669 of_propagate_archdata(op);
+1 -1
arch/sparc/kernel/time_32.c
··· 142 142 }, 143 143 }; 144 144 145 - static int __devinit clock_probe(struct of_device *op, const struct of_device_id *match) 145 + static int __devinit clock_probe(struct platform_device *op, const struct of_device_id *match) 146 146 { 147 147 struct device_node *dp = op->dev.of_node; 148 148 const char *model = of_get_property(dp, "model", NULL);
+3 -3
arch/sparc/kernel/time_64.c
··· 419 419 .num_resources = 1, 420 420 }; 421 421 422 - static int __devinit rtc_probe(struct of_device *op, const struct of_device_id *match) 422 + static int __devinit rtc_probe(struct platform_device *op, const struct of_device_id *match) 423 423 { 424 424 struct resource *r; 425 425 ··· 477 477 .num_resources = 1, 478 478 }; 479 479 480 - static int __devinit bq4802_probe(struct of_device *op, const struct of_device_id *match) 480 + static int __devinit bq4802_probe(struct platform_device *op, const struct of_device_id *match) 481 481 { 482 482 483 483 printk(KERN_INFO "%s: BQ4802 regs at 0x%llx\n", ··· 534 534 }, 535 535 }; 536 536 537 - static int __devinit mostek_probe(struct of_device *op, const struct of_device_id *match) 537 + static int __devinit mostek_probe(struct platform_device *op, const struct of_device_id *match) 538 538 { 539 539 struct device_node *dp = op->dev.of_node; 540 540
+2 -2
arch/sparc/mm/io-unit.c
··· 35 35 #define IOPERM (IOUPTE_CACHE | IOUPTE_WRITE | IOUPTE_VALID) 36 36 #define MKIOPTE(phys) __iopte((((phys)>>4) & IOUPTE_PAGE) | IOPERM) 37 37 38 - static void __init iounit_iommu_init(struct of_device *op) 38 + static void __init iounit_iommu_init(struct platform_device *op) 39 39 { 40 40 struct iounit_struct *iounit; 41 41 iopte_t *xpt, *xptend; ··· 74 74 struct device_node *dp; 75 75 76 76 for_each_node_by_name(dp, "sbi") { 77 - struct of_device *op = of_find_device_by_node(dp); 77 + struct platform_device *op = of_find_device_by_node(dp); 78 78 79 79 iounit_iommu_init(op); 80 80 of_propagate_archdata(op);
+2 -2
arch/sparc/mm/iommu.c
··· 56 56 #define IOPERM (IOPTE_CACHE | IOPTE_WRITE | IOPTE_VALID) 57 57 #define MKIOPTE(pfn, perm) (((((pfn)<<8) & IOPTE_PAGE) | (perm)) & ~IOPTE_WAZ) 58 58 59 - static void __init sbus_iommu_init(struct of_device *op) 59 + static void __init sbus_iommu_init(struct platform_device *op) 60 60 { 61 61 struct iommu_struct *iommu; 62 62 unsigned int impl, vers; ··· 132 132 struct device_node *dp; 133 133 134 134 for_each_node_by_name(dp, "iommu") { 135 - struct of_device *op = of_find_device_by_node(dp); 135 + struct platform_device *op = of_find_device_by_node(dp); 136 136 137 137 sbus_iommu_init(op); 138 138 of_propagate_archdata(op);