| .. | .. |
|---|
| 40 | 40 | static struct device_node *find_vio_slot_node(char *drc_name) |
|---|
| 41 | 41 | { |
|---|
| 42 | 42 | struct device_node *parent = of_find_node_by_name(NULL, "vdevice"); |
|---|
| 43 | | - struct device_node *dn = NULL; |
|---|
| 43 | + struct device_node *dn; |
|---|
| 44 | 44 | int rc; |
|---|
| 45 | 45 | |
|---|
| 46 | 46 | if (!parent) |
|---|
| 47 | 47 | return NULL; |
|---|
| 48 | 48 | |
|---|
| 49 | | - while ((dn = of_get_next_child(parent, dn))) { |
|---|
| 49 | + for_each_child_of_node(parent, dn) { |
|---|
| 50 | 50 | rc = rpaphp_check_drc_props(dn, drc_name, NULL); |
|---|
| 51 | 51 | if (rc == 0) |
|---|
| 52 | 52 | break; |
|---|
| .. | .. |
|---|
| 60 | 60 | static struct device_node *find_php_slot_pci_node(char *drc_name, |
|---|
| 61 | 61 | char *drc_type) |
|---|
| 62 | 62 | { |
|---|
| 63 | | - struct device_node *np = NULL; |
|---|
| 63 | + struct device_node *np; |
|---|
| 64 | 64 | int rc; |
|---|
| 65 | 65 | |
|---|
| 66 | | - while ((np = of_find_node_by_name(np, "pci"))) { |
|---|
| 66 | + for_each_node_by_name(np, "pci") { |
|---|
| 67 | 67 | rc = rpaphp_check_drc_props(np, drc_name, drc_type); |
|---|
| 68 | 68 | if (rc == 0) |
|---|
| 69 | 69 | break; |
|---|
| .. | .. |
|---|
| 140 | 140 | struct pci_controller *phb = pdn->phb; |
|---|
| 141 | 141 | struct pci_dev *dev = NULL; |
|---|
| 142 | 142 | |
|---|
| 143 | | - eeh_add_device_tree_early(pdn); |
|---|
| 143 | + pseries_eeh_init_edev_recursive(pdn); |
|---|
| 144 | 144 | |
|---|
| 145 | 145 | /* Add EADS device to PHB bus, adding new entry to bus->devices */ |
|---|
| 146 | 146 | dev = of_create_pci_dev(dn, phb->bus, pdn->devfn); |
|---|
| .. | .. |
|---|
| 352 | 352 | * -ENODEV Not a valid drc_name |
|---|
| 353 | 353 | * -EIO Internal PCI Error |
|---|
| 354 | 354 | */ |
|---|
| 355 | | -int dlpar_remove_pci_slot(char *drc_name, struct device_node *dn) |
|---|
| 355 | +static int dlpar_remove_pci_slot(char *drc_name, struct device_node *dn) |
|---|
| 356 | 356 | { |
|---|
| 357 | 357 | struct pci_bus *bus; |
|---|
| 358 | 358 | struct slot *slot; |
|---|
| .. | .. |
|---|
| 458 | 458 | return (int) (rc != RTAS_UNKNOWN_SERVICE); |
|---|
| 459 | 459 | } |
|---|
| 460 | 460 | |
|---|
| 461 | | -int __init rpadlpar_io_init(void) |
|---|
| 461 | +static int __init rpadlpar_io_init(void) |
|---|
| 462 | 462 | { |
|---|
| 463 | 463 | |
|---|
| 464 | 464 | if (!is_dlpar_capable()) { |
|---|
| .. | .. |
|---|
| 470 | 470 | return dlpar_sysfs_init(); |
|---|
| 471 | 471 | } |
|---|
| 472 | 472 | |
|---|
| 473 | | -void rpadlpar_io_exit(void) |
|---|
| 473 | +static void __exit rpadlpar_io_exit(void) |
|---|
| 474 | 474 | { |
|---|
| 475 | 475 | dlpar_sysfs_exit(); |
|---|
| 476 | | - return; |
|---|
| 477 | 476 | } |
|---|
| 478 | 477 | |
|---|
| 479 | 478 | module_init(rpadlpar_io_init); |
|---|