diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2007-04-03 08:40:39 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-04-12 13:55:19 -0400 |
commit | d05c7a80cf39ae7d0f8d0c3e47c93d51fcd393d3 (patch) | |
tree | 6b51334a2427c0392c391d0e0bfab0ab9aae690e /drivers | |
parent | c4f55b394505fff6ad831d17e36e02dde1c3a8d7 (diff) |
[POWERPC] Rename get_property to of_get_property: drivers
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers')
50 files changed, 122 insertions, 120 deletions
diff --git a/drivers/ata/sata_svw.c b/drivers/ata/sata_svw.c index b121195cc59..3e5621102d5 100644 --- a/drivers/ata/sata_svw.c +++ b/drivers/ata/sata_svw.c | |||
@@ -297,7 +297,7 @@ static int k2_sata_proc_info(struct Scsi_Host *shost, char *page, char **start, | |||
297 | /* Match it to a port node */ | 297 | /* Match it to a port node */ |
298 | index = (ap == ap->host->ports[0]) ? 0 : 1; | 298 | index = (ap == ap->host->ports[0]) ? 0 : 1; |
299 | for (np = np->child; np != NULL; np = np->sibling) { | 299 | for (np = np->child; np != NULL; np = np->sibling) { |
300 | const u32 *reg = get_property(np, "reg", NULL); | 300 | const u32 *reg = of_get_property(np, "reg", NULL); |
301 | if (!reg) | 301 | if (!reg) |
302 | continue; | 302 | continue; |
303 | if (index == *reg) | 303 | if (index == *reg) |
diff --git a/drivers/char/agp/uninorth-agp.c b/drivers/char/agp/uninorth-agp.c index 91b062126a6..42c0a600b1a 100644 --- a/drivers/char/agp/uninorth-agp.c +++ b/drivers/char/agp/uninorth-agp.c | |||
@@ -613,7 +613,7 @@ static int __devinit agp_uninorth_probe(struct pci_dev *pdev, | |||
613 | uninorth_node = of_find_node_by_name(NULL, "u3"); | 613 | uninorth_node = of_find_node_by_name(NULL, "u3"); |
614 | } | 614 | } |
615 | if (uninorth_node) { | 615 | if (uninorth_node) { |
616 | const int *revprop = get_property(uninorth_node, | 616 | const int *revprop = of_get_property(uninorth_node, |
617 | "device-rev", NULL); | 617 | "device-rev", NULL); |
618 | if (revprop != NULL) | 618 | if (revprop != NULL) |
619 | uninorth_rev = *revprop & 0x3f; | 619 | uninorth_rev = *revprop & 0x3f; |
diff --git a/drivers/char/briq_panel.c b/drivers/char/briq_panel.c index 8dcf9d20f44..669965a461f 100644 --- a/drivers/char/briq_panel.c +++ b/drivers/char/briq_panel.c | |||
@@ -206,7 +206,7 @@ static int __init briq_panel_init(void) | |||
206 | const char *machine; | 206 | const char *machine; |
207 | int i; | 207 | int i; |
208 | 208 | ||
209 | machine = get_property(root, "model", NULL); | 209 | machine = of_get_property(root, "model", NULL); |
210 | if (!machine || strncmp(machine, "TotalImpact,BRIQ-1", 18) != 0) | 210 | if (!machine || strncmp(machine, "TotalImpact,BRIQ-1", 18) != 0) |
211 | return -ENODEV; | 211 | return -ENODEV; |
212 | 212 | ||
diff --git a/drivers/char/hvc_iseries.c b/drivers/char/hvc_iseries.c index f144a947bd1..ec420fe8a90 100644 --- a/drivers/char/hvc_iseries.c +++ b/drivers/char/hvc_iseries.c | |||
@@ -575,7 +575,7 @@ static int hvc_find_vtys(void) | |||
575 | (num_found >= VTTY_PORTS)) | 575 | (num_found >= VTTY_PORTS)) |
576 | break; | 576 | break; |
577 | 577 | ||
578 | vtermno = get_property(vty, "reg", NULL); | 578 | vtermno = of_get_property(vty, "reg", NULL); |
579 | if (!vtermno) | 579 | if (!vtermno) |
580 | continue; | 580 | continue; |
581 | 581 | ||
diff --git a/drivers/char/hvc_vio.c b/drivers/char/hvc_vio.c index f9c00844d2b..94a542e20ef 100644 --- a/drivers/char/hvc_vio.c +++ b/drivers/char/hvc_vio.c | |||
@@ -153,7 +153,7 @@ static int hvc_find_vtys(void) | |||
153 | if (num_found >= MAX_NR_HVC_CONSOLES) | 153 | if (num_found >= MAX_NR_HVC_CONSOLES) |
154 | break; | 154 | break; |
155 | 155 | ||
156 | vtermno = get_property(vty, "reg", NULL); | 156 | vtermno = of_get_property(vty, "reg", NULL); |
157 | if (!vtermno) | 157 | if (!vtermno) |
158 | continue; | 158 | continue; |
159 | 159 | ||
diff --git a/drivers/char/hvsi.c b/drivers/char/hvsi.c index 50315d6364f..d5a752da322 100644 --- a/drivers/char/hvsi.c +++ b/drivers/char/hvsi.c | |||
@@ -1279,8 +1279,8 @@ static int __init hvsi_console_init(void) | |||
1279 | struct hvsi_struct *hp; | 1279 | struct hvsi_struct *hp; |
1280 | const uint32_t *vtermno, *irq; | 1280 | const uint32_t *vtermno, *irq; |
1281 | 1281 | ||
1282 | vtermno = get_property(vty, "reg", NULL); | 1282 | vtermno = of_get_property(vty, "reg", NULL); |
1283 | irq = get_property(vty, "interrupts", NULL); | 1283 | irq = of_get_property(vty, "interrupts", NULL); |
1284 | if (!vtermno || !irq) | 1284 | if (!vtermno || !irq) |
1285 | continue; | 1285 | continue; |
1286 | 1286 | ||
diff --git a/drivers/char/tpm/tpm_atmel.h b/drivers/char/tpm/tpm_atmel.h index 3c852009196..377bc6077c6 100644 --- a/drivers/char/tpm/tpm_atmel.h +++ b/drivers/char/tpm/tpm_atmel.h | |||
@@ -52,7 +52,7 @@ static void __iomem * atmel_get_base_addr(unsigned long *base, int *region_size) | |||
52 | return NULL; | 52 | return NULL; |
53 | } | 53 | } |
54 | 54 | ||
55 | reg = get_property(dn, "reg", ®len); | 55 | reg = of_get_property(dn, "reg", ®len); |
56 | naddrc = of_n_addr_cells(dn); | 56 | naddrc = of_n_addr_cells(dn); |
57 | nsizec = of_n_size_cells(dn); | 57 | nsizec = of_n_size_cells(dn); |
58 | 58 | ||
diff --git a/drivers/hwmon/ams/ams-core.c b/drivers/hwmon/ams/ams-core.c index f5ebad56141..93b963fd129 100644 --- a/drivers/hwmon/ams/ams-core.c +++ b/drivers/hwmon/ams/ams-core.c | |||
@@ -144,7 +144,7 @@ int ams_sensor_attach(void) | |||
144 | const u32 *prop; | 144 | const u32 *prop; |
145 | 145 | ||
146 | /* Get orientation */ | 146 | /* Get orientation */ |
147 | prop = get_property(ams_info.of_node, "orientation", NULL); | 147 | prop = of_get_property(ams_info.of_node, "orientation", NULL); |
148 | if (!prop) | 148 | if (!prop) |
149 | return -ENODEV; | 149 | return -ENODEV; |
150 | ams_info.orient1 = *prop; | 150 | ams_info.orient1 = *prop; |
diff --git a/drivers/hwmon/ams/ams-i2c.c b/drivers/hwmon/ams/ams-i2c.c index 485d333bcb3..ccd5cefae90 100644 --- a/drivers/hwmon/ams/ams-i2c.c +++ b/drivers/hwmon/ams/ams-i2c.c | |||
@@ -276,7 +276,7 @@ int __init ams_i2c_init(struct device_node *np) | |||
276 | ams_info.bustype = BUS_I2C; | 276 | ams_info.bustype = BUS_I2C; |
277 | 277 | ||
278 | /* look for bus either using "reg" or by path */ | 278 | /* look for bus either using "reg" or by path */ |
279 | prop = get_property(ams_info.of_node, "reg", NULL); | 279 | prop = of_get_property(ams_info.of_node, "reg", NULL); |
280 | if (!prop) { | 280 | if (!prop) { |
281 | result = -ENODEV; | 281 | result = -ENODEV; |
282 | 282 | ||
diff --git a/drivers/hwmon/ams/ams-pmu.c b/drivers/hwmon/ams/ams-pmu.c index 1b01c215bfe..9463e9768f6 100644 --- a/drivers/hwmon/ams/ams-pmu.c +++ b/drivers/hwmon/ams/ams-pmu.c | |||
@@ -160,7 +160,7 @@ int __init ams_pmu_init(struct device_node *np) | |||
160 | ams_info.bustype = BUS_HOST; | 160 | ams_info.bustype = BUS_HOST; |
161 | 161 | ||
162 | /* Get PMU command, should be 0x4e, but we can never know */ | 162 | /* Get PMU command, should be 0x4e, but we can never know */ |
163 | prop = get_property(ams_info.of_node, "reg", NULL); | 163 | prop = of_get_property(ams_info.of_node, "reg", NULL); |
164 | if (!prop) { | 164 | if (!prop) { |
165 | result = -ENODEV; | 165 | result = -ENODEV; |
166 | goto exit; | 166 | goto exit; |
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c index 071a030ec26..774bfd39a59 100644 --- a/drivers/ide/ppc/pmac.c +++ b/drivers/ide/ppc/pmac.c | |||
@@ -1175,14 +1175,14 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif) | |||
1175 | pmif->broken_dma = 1; | 1175 | pmif->broken_dma = 1; |
1176 | } | 1176 | } |
1177 | 1177 | ||
1178 | bidp = get_property(np, "AAPL,bus-id", NULL); | 1178 | bidp = of_get_property(np, "AAPL,bus-id", NULL); |
1179 | pmif->aapl_bus_id = bidp ? *bidp : 0; | 1179 | pmif->aapl_bus_id = bidp ? *bidp : 0; |
1180 | 1180 | ||
1181 | /* Get cable type from device-tree */ | 1181 | /* Get cable type from device-tree */ |
1182 | if (pmif->kind == controller_kl_ata4 || pmif->kind == controller_un_ata6 | 1182 | if (pmif->kind == controller_kl_ata4 || pmif->kind == controller_un_ata6 |
1183 | || pmif->kind == controller_k2_ata6 | 1183 | || pmif->kind == controller_k2_ata6 |
1184 | || pmif->kind == controller_sh_ata6) { | 1184 | || pmif->kind == controller_sh_ata6) { |
1185 | const char* cable = get_property(np, "cable-type", NULL); | 1185 | const char* cable = of_get_property(np, "cable-type", NULL); |
1186 | if (cable && !strncmp(cable, "80-", 3)) | 1186 | if (cable && !strncmp(cable, "80-", 3)) |
1187 | pmif->cable_80 = 1; | 1187 | pmif->cable_80 = 1; |
1188 | } | 1188 | } |
diff --git a/drivers/infiniband/hw/ehca/ehca_main.c b/drivers/infiniband/hw/ehca/ehca_main.c index cee66b79b30..e5c2bcc2625 100644 --- a/drivers/infiniband/hw/ehca/ehca_main.c +++ b/drivers/infiniband/hw/ehca/ehca_main.c | |||
@@ -569,7 +569,7 @@ static int __devinit ehca_probe(struct ibmebus_dev *dev, | |||
569 | struct ib_pd *ibpd; | 569 | struct ib_pd *ibpd; |
570 | int ret; | 570 | int ret; |
571 | 571 | ||
572 | handle = get_property(dev->ofdev.node, "ibm,hca-handle", NULL); | 572 | handle = of_get_property(dev->ofdev.node, "ibm,hca-handle", NULL); |
573 | if (!handle) { | 573 | if (!handle) { |
574 | ehca_gen_err("Cannot get eHCA handle for adapter: %s.", | 574 | ehca_gen_err("Cannot get eHCA handle for adapter: %s.", |
575 | dev->ofdev.node->full_name); | 575 | dev->ofdev.node->full_name); |
diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c index e851266a2db..c96b7fe882a 100644 --- a/drivers/macintosh/macio_asic.c +++ b/drivers/macintosh/macio_asic.c | |||
@@ -395,7 +395,7 @@ static struct macio_dev * macio_add_one_device(struct macio_chip *chip, | |||
395 | #endif | 395 | #endif |
396 | MAX_NODE_NAME_SIZE, np->name); | 396 | MAX_NODE_NAME_SIZE, np->name); |
397 | } else { | 397 | } else { |
398 | reg = get_property(np, "reg", NULL); | 398 | reg = of_get_property(np, "reg", NULL); |
399 | sprintf(dev->ofdev.dev.bus_id, "%1d.%08x:%.*s", | 399 | sprintf(dev->ofdev.dev.bus_id, "%1d.%08x:%.*s", |
400 | chip->lbus.index, | 400 | chip->lbus.index, |
401 | reg ? *reg : 0, MAX_NODE_NAME_SIZE, np->name); | 401 | reg ? *reg : 0, MAX_NODE_NAME_SIZE, np->name); |
diff --git a/drivers/macintosh/macio_sysfs.c b/drivers/macintosh/macio_sysfs.c index 0a5647fb856..cc826791265 100644 --- a/drivers/macintosh/macio_sysfs.c +++ b/drivers/macintosh/macio_sysfs.c | |||
@@ -21,7 +21,7 @@ compatible_show (struct device *dev, struct device_attribute *attr, char *buf) | |||
21 | int length = 0; | 21 | int length = 0; |
22 | 22 | ||
23 | of = &to_macio_device (dev)->ofdev; | 23 | of = &to_macio_device (dev)->ofdev; |
24 | compat = get_property(of->node, "compatible", &cplen); | 24 | compat = of_get_property(of->node, "compatible", &cplen); |
25 | if (!compat) { | 25 | if (!compat) { |
26 | *buf = '\0'; | 26 | *buf = '\0'; |
27 | return 0; | 27 | return 0; |
@@ -47,7 +47,7 @@ static ssize_t modalias_show (struct device *dev, struct device_attribute *attr, | |||
47 | int length; | 47 | int length; |
48 | 48 | ||
49 | of = &to_macio_device (dev)->ofdev; | 49 | of = &to_macio_device (dev)->ofdev; |
50 | compat = get_property(of->node, "compatible", &cplen); | 50 | compat = of_get_property(of->node, "compatible", &cplen); |
51 | if (!compat) compat = "", cplen = 1; | 51 | if (!compat) compat = "", cplen = 1; |
52 | length = sprintf (buf, "of:N%sT%s", of->node->name, of->node->type); | 52 | length = sprintf (buf, "of:N%sT%s", of->node->name, of->node->type); |
53 | buf += length; | 53 | buf += length; |
diff --git a/drivers/macintosh/rack-meter.c b/drivers/macintosh/rack-meter.c index f83fad2a3ff..4177ff00475 100644 --- a/drivers/macintosh/rack-meter.c +++ b/drivers/macintosh/rack-meter.c | |||
@@ -387,7 +387,7 @@ static int __devinit rackmeter_probe(struct macio_dev* mdev, | |||
387 | if (strcmp(np->name, "lightshow") == 0) | 387 | if (strcmp(np->name, "lightshow") == 0) |
388 | break; | 388 | break; |
389 | if ((strcmp(np->name, "sound") == 0) && | 389 | if ((strcmp(np->name, "sound") == 0) && |
390 | get_property(np, "virtual", NULL) != NULL) | 390 | of_get_property(np, "virtual", NULL) != NULL) |
391 | break; | 391 | break; |
392 | } | 392 | } |
393 | if (np == NULL) { | 393 | if (np == NULL) { |
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c index 45bb3c1dfeb..135f22eb1ad 100644 --- a/drivers/macintosh/smu.c +++ b/drivers/macintosh/smu.c | |||
@@ -491,7 +491,7 @@ int __init smu_init (void) | |||
491 | printk(KERN_ERR "SMU: Can't find doorbell GPIO !\n"); | 491 | printk(KERN_ERR "SMU: Can't find doorbell GPIO !\n"); |
492 | goto fail; | 492 | goto fail; |
493 | } | 493 | } |
494 | data = get_property(smu->db_node, "reg", NULL); | 494 | data = of_get_property(smu->db_node, "reg", NULL); |
495 | if (data == NULL) { | 495 | if (data == NULL) { |
496 | of_node_put(smu->db_node); | 496 | of_node_put(smu->db_node); |
497 | smu->db_node = NULL; | 497 | smu->db_node = NULL; |
@@ -512,7 +512,7 @@ int __init smu_init (void) | |||
512 | smu->msg_node = of_find_node_by_name(NULL, "smu-interrupt"); | 512 | smu->msg_node = of_find_node_by_name(NULL, "smu-interrupt"); |
513 | if (smu->msg_node == NULL) | 513 | if (smu->msg_node == NULL) |
514 | break; | 514 | break; |
515 | data = get_property(smu->msg_node, "reg", NULL); | 515 | data = of_get_property(smu->msg_node, "reg", NULL); |
516 | if (data == NULL) { | 516 | if (data == NULL) { |
517 | of_node_put(smu->msg_node); | 517 | of_node_put(smu->msg_node); |
518 | smu->msg_node = NULL; | 518 | smu->msg_node = NULL; |
@@ -1004,7 +1004,7 @@ const struct smu_sdbp_header *__smu_get_sdb_partition(int id, | |||
1004 | } else | 1004 | } else |
1005 | mutex_lock(&smu_part_access); | 1005 | mutex_lock(&smu_part_access); |
1006 | 1006 | ||
1007 | part = get_property(smu->of_node, pname, size); | 1007 | part = of_get_property(smu->of_node, pname, size); |
1008 | if (part == NULL) { | 1008 | if (part == NULL) { |
1009 | DPRINTK("trying to extract from SMU ...\n"); | 1009 | DPRINTK("trying to extract from SMU ...\n"); |
1010 | part = smu_create_sdb_partition(id); | 1010 | part = smu_create_sdb_partition(id); |
diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c index a7ce5592663..228903403cf 100644 --- a/drivers/macintosh/therm_adt746x.c +++ b/drivers/macintosh/therm_adt746x.c | |||
@@ -567,13 +567,13 @@ thermostat_init(void) | |||
567 | else | 567 | else |
568 | return -ENODEV; | 568 | return -ENODEV; |
569 | 569 | ||
570 | prop = get_property(np, "hwsensor-params-version", NULL); | 570 | prop = of_get_property(np, "hwsensor-params-version", NULL); |
571 | printk(KERN_INFO "adt746x: version %d (%ssupported)\n", *prop, | 571 | printk(KERN_INFO "adt746x: version %d (%ssupported)\n", *prop, |
572 | (*prop == 1)?"":"un"); | 572 | (*prop == 1)?"":"un"); |
573 | if (*prop != 1) | 573 | if (*prop != 1) |
574 | return -ENODEV; | 574 | return -ENODEV; |
575 | 575 | ||
576 | prop = get_property(np, "reg", NULL); | 576 | prop = of_get_property(np, "reg", NULL); |
577 | if (!prop) | 577 | if (!prop) |
578 | return -ENODEV; | 578 | return -ENODEV; |
579 | 579 | ||
@@ -591,9 +591,9 @@ thermostat_init(void) | |||
591 | "limit_adjust: %d, fan_speed: %d\n", | 591 | "limit_adjust: %d, fan_speed: %d\n", |
592 | therm_bus, therm_address, limit_adjust, fan_speed); | 592 | therm_bus, therm_address, limit_adjust, fan_speed); |
593 | 593 | ||
594 | if (get_property(np, "hwsensor-location", NULL)) { | 594 | if (of_get_property(np, "hwsensor-location", NULL)) { |
595 | for (i = 0; i < 3; i++) { | 595 | for (i = 0; i < 3; i++) { |
596 | sensor_location[i] = get_property(np, | 596 | sensor_location[i] = of_get_property(np, |
597 | "hwsensor-location", NULL) + offset; | 597 | "hwsensor-location", NULL) + offset; |
598 | 598 | ||
599 | if (sensor_location[i] == NULL) | 599 | if (sensor_location[i] == NULL) |
diff --git a/drivers/macintosh/therm_pm72.c b/drivers/macintosh/therm_pm72.c index 2e4ad44a863..78ff1861713 100644 --- a/drivers/macintosh/therm_pm72.c +++ b/drivers/macintosh/therm_pm72.c | |||
@@ -674,7 +674,7 @@ static int read_eeprom(int cpu, struct mpu_data *out) | |||
674 | printk(KERN_ERR "therm_pm72: Failed to retrieve cpuid node from device-tree\n"); | 674 | printk(KERN_ERR "therm_pm72: Failed to retrieve cpuid node from device-tree\n"); |
675 | return -ENODEV; | 675 | return -ENODEV; |
676 | } | 676 | } |
677 | data = get_property(np, "cpuid", &len); | 677 | data = of_get_property(np, "cpuid", &len); |
678 | if (data == NULL) { | 678 | if (data == NULL) { |
679 | printk(KERN_ERR "therm_pm72: Failed to retrieve cpuid property from device-tree\n"); | 679 | printk(KERN_ERR "therm_pm72: Failed to retrieve cpuid property from device-tree\n"); |
680 | of_node_put(np); | 680 | of_node_put(np); |
@@ -1337,7 +1337,7 @@ static int init_backside_state(struct backside_pid_state *state) | |||
1337 | */ | 1337 | */ |
1338 | u3 = of_find_node_by_path("/u3@0,f8000000"); | 1338 | u3 = of_find_node_by_path("/u3@0,f8000000"); |
1339 | if (u3 != NULL) { | 1339 | if (u3 != NULL) { |
1340 | const u32 *vers = get_property(u3, "device-rev", NULL); | 1340 | const u32 *vers = of_get_property(u3, "device-rev", NULL); |
1341 | if (vers) | 1341 | if (vers) |
1342 | if (((*vers) & 0x3f) < 0x34) | 1342 | if (((*vers) & 0x3f) < 0x34) |
1343 | u3h = 0; | 1343 | u3h = 0; |
@@ -2129,8 +2129,8 @@ static void fcu_lookup_fans(struct device_node *fcu_node) | |||
2129 | continue; | 2129 | continue; |
2130 | 2130 | ||
2131 | /* Lookup for a matching location */ | 2131 | /* Lookup for a matching location */ |
2132 | loc = get_property(np, "location", NULL); | 2132 | loc = of_get_property(np, "location", NULL); |
2133 | reg = get_property(np, "reg", NULL); | 2133 | reg = of_get_property(np, "reg", NULL); |
2134 | if (loc == NULL || reg == NULL) | 2134 | if (loc == NULL || reg == NULL) |
2135 | continue; | 2135 | continue; |
2136 | DBG(" matching location: %s, reg: 0x%08x\n", loc, *reg); | 2136 | DBG(" matching location: %s, reg: 0x%08x\n", loc, *reg); |
diff --git a/drivers/macintosh/therm_windtunnel.c b/drivers/macintosh/therm_windtunnel.c index a1d3a987cb3..35233de460a 100644 --- a/drivers/macintosh/therm_windtunnel.c +++ b/drivers/macintosh/therm_windtunnel.c | |||
@@ -492,7 +492,7 @@ g4fan_init( void ) | |||
492 | 492 | ||
493 | if( !(np=of_find_node_by_name(NULL, "power-mgt")) ) | 493 | if( !(np=of_find_node_by_name(NULL, "power-mgt")) ) |
494 | return -ENODEV; | 494 | return -ENODEV; |
495 | info = get_property(np, "thermal-info", NULL); | 495 | info = of_get_property(np, "thermal-info", NULL); |
496 | of_node_put(np); | 496 | of_node_put(np); |
497 | 497 | ||
498 | if( !info || !machine_is_compatible("PowerMac3,6") ) | 498 | if( !info || !machine_is_compatible("PowerMac3,6") ) |
diff --git a/drivers/macintosh/via-cuda.c b/drivers/macintosh/via-cuda.c index d58fcf6cca0..76d21775fc3 100644 --- a/drivers/macintosh/via-cuda.c +++ b/drivers/macintosh/via-cuda.c | |||
@@ -131,7 +131,7 @@ int __init find_via_cuda(void) | |||
131 | if (vias == 0) | 131 | if (vias == 0) |
132 | return 0; | 132 | return 0; |
133 | 133 | ||
134 | reg = get_property(vias, "reg", NULL); | 134 | reg = of_get_property(vias, "reg", NULL); |
135 | if (reg == NULL) { | 135 | if (reg == NULL) { |
136 | printk(KERN_ERR "via-cuda: No \"reg\" property !\n"); | 136 | printk(KERN_ERR "via-cuda: No \"reg\" property !\n"); |
137 | goto fail; | 137 | goto fail; |
diff --git a/drivers/macintosh/via-pmu-led.c b/drivers/macintosh/via-pmu-led.c index f8d7a460c9a..fc89a7047cd 100644 --- a/drivers/macintosh/via-pmu-led.c +++ b/drivers/macintosh/via-pmu-led.c | |||
@@ -118,7 +118,7 @@ static int __init via_pmu_led_init(void) | |||
118 | dt = of_find_node_by_path("/"); | 118 | dt = of_find_node_by_path("/"); |
119 | if (dt == NULL) | 119 | if (dt == NULL) |
120 | return -ENODEV; | 120 | return -ENODEV; |
121 | model = get_property(dt, "model", NULL); | 121 | model = of_get_property(dt, "model", NULL); |
122 | if (model == NULL) | 122 | if (model == NULL) |
123 | return -ENODEV; | 123 | return -ENODEV; |
124 | if (strncmp(model, "PowerBook", strlen("PowerBook")) != 0 && | 124 | if (strncmp(model, "PowerBook", strlen("PowerBook")) != 0 && |
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index ca3c4aba5a2..75623fd1879 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c | |||
@@ -289,7 +289,7 @@ int __init find_via_pmu(void) | |||
289 | if (vias == NULL) | 289 | if (vias == NULL) |
290 | return 0; | 290 | return 0; |
291 | 291 | ||
292 | reg = get_property(vias, "reg", NULL); | 292 | reg = of_get_property(vias, "reg", NULL); |
293 | if (reg == NULL) { | 293 | if (reg == NULL) { |
294 | printk(KERN_ERR "via-pmu: No \"reg\" property !\n"); | 294 | printk(KERN_ERR "via-pmu: No \"reg\" property !\n"); |
295 | goto fail; | 295 | goto fail; |
@@ -331,7 +331,7 @@ int __init find_via_pmu(void) | |||
331 | 331 | ||
332 | gpiop = of_find_node_by_name(NULL, "gpio"); | 332 | gpiop = of_find_node_by_name(NULL, "gpio"); |
333 | if (gpiop) { | 333 | if (gpiop) { |
334 | reg = get_property(gpiop, "reg", NULL); | 334 | reg = of_get_property(gpiop, "reg", NULL); |
335 | if (reg) | 335 | if (reg) |
336 | gaddr = of_translate_address(gpiop, reg); | 336 | gaddr = of_translate_address(gpiop, reg); |
337 | if (gaddr != OF_BAD_ADDR) | 337 | if (gaddr != OF_BAD_ADDR) |
@@ -487,7 +487,7 @@ static int __init via_pmu_dev_init(void) | |||
487 | struct device_node* prim = find_devices("power-mgt"); | 487 | struct device_node* prim = find_devices("power-mgt"); |
488 | const u32 *prim_info = NULL; | 488 | const u32 *prim_info = NULL; |
489 | if (prim) | 489 | if (prim) |
490 | prim_info = get_property(prim, "prim-info", NULL); | 490 | prim_info = of_get_property(prim, "prim-info", NULL); |
491 | if (prim_info) { | 491 | if (prim_info) { |
492 | /* Other stuffs here yet unknown */ | 492 | /* Other stuffs here yet unknown */ |
493 | pmu_battery_count = (prim_info[6] >> 16) & 0xff; | 493 | pmu_battery_count = (prim_info[6] >> 16) & 0xff; |
diff --git a/drivers/macintosh/windfarm_lm75_sensor.c b/drivers/macintosh/windfarm_lm75_sensor.c index 3f7967feaf5..ab4d1b63f63 100644 --- a/drivers/macintosh/windfarm_lm75_sensor.c +++ b/drivers/macintosh/windfarm_lm75_sensor.c | |||
@@ -176,7 +176,7 @@ static int wf_lm75_attach(struct i2c_adapter *adapter) | |||
176 | for (dev = NULL; | 176 | for (dev = NULL; |
177 | (dev = of_get_next_child(busnode, dev)) != NULL;) { | 177 | (dev = of_get_next_child(busnode, dev)) != NULL;) { |
178 | const char *loc = | 178 | const char *loc = |
179 | get_property(dev, "hwsensor-location", NULL); | 179 | of_get_property(dev, "hwsensor-location", NULL); |
180 | u8 addr; | 180 | u8 addr; |
181 | 181 | ||
182 | /* We must re-match the adapter in order to properly check | 182 | /* We must re-match the adapter in order to properly check |
diff --git a/drivers/macintosh/windfarm_max6690_sensor.c b/drivers/macintosh/windfarm_max6690_sensor.c index eae1189d6c4..eaa74afa175 100644 --- a/drivers/macintosh/windfarm_max6690_sensor.c +++ b/drivers/macintosh/windfarm_max6690_sensor.c | |||
@@ -134,7 +134,7 @@ static int wf_max6690_attach(struct i2c_adapter *adapter) | |||
134 | if (!device_is_compatible(dev, "max6690")) | 134 | if (!device_is_compatible(dev, "max6690")) |
135 | continue; | 135 | continue; |
136 | addr = pmac_i2c_get_dev_addr(dev); | 136 | addr = pmac_i2c_get_dev_addr(dev); |
137 | loc = get_property(dev, "hwsensor-location", NULL); | 137 | loc = of_get_property(dev, "hwsensor-location", NULL); |
138 | if (loc == NULL || addr == 0) | 138 | if (loc == NULL || addr == 0) |
139 | continue; | 139 | continue; |
140 | printk("found max6690, loc=%s addr=0x%02x\n", loc, addr); | 140 | printk("found max6690, loc=%s addr=0x%02x\n", loc, addr); |
diff --git a/drivers/macintosh/windfarm_smu_controls.c b/drivers/macintosh/windfarm_smu_controls.c index 31b750d6120..ff398adc028 100644 --- a/drivers/macintosh/windfarm_smu_controls.c +++ b/drivers/macintosh/windfarm_smu_controls.c | |||
@@ -167,7 +167,7 @@ static struct smu_fan_control *smu_fan_create(struct device_node *node, | |||
167 | if (fct == NULL) | 167 | if (fct == NULL) |
168 | return NULL; | 168 | return NULL; |
169 | fct->ctrl.ops = &smu_fan_ops; | 169 | fct->ctrl.ops = &smu_fan_ops; |
170 | l = get_property(node, "location", NULL); | 170 | l = of_get_property(node, "location", NULL); |
171 | if (l == NULL) | 171 | if (l == NULL) |
172 | goto fail; | 172 | goto fail; |
173 | 173 | ||
@@ -224,17 +224,17 @@ static struct smu_fan_control *smu_fan_create(struct device_node *node, | |||
224 | goto fail; | 224 | goto fail; |
225 | 225 | ||
226 | /* Get min & max values*/ | 226 | /* Get min & max values*/ |
227 | v = get_property(node, "min-value", NULL); | 227 | v = of_get_property(node, "min-value", NULL); |
228 | if (v == NULL) | 228 | if (v == NULL) |
229 | goto fail; | 229 | goto fail; |
230 | fct->min = *v; | 230 | fct->min = *v; |
231 | v = get_property(node, "max-value", NULL); | 231 | v = of_get_property(node, "max-value", NULL); |
232 | if (v == NULL) | 232 | if (v == NULL) |
233 | goto fail; | 233 | goto fail; |
234 | fct->max = *v; | 234 | fct->max = *v; |
235 | 235 | ||
236 | /* Get "reg" value */ | 236 | /* Get "reg" value */ |
237 | reg = get_property(node, "reg", NULL); | 237 | reg = of_get_property(node, "reg", NULL); |
238 | if (reg == NULL) | 238 | if (reg == NULL) |
239 | goto fail; | 239 | goto fail; |
240 | fct->reg = *reg; | 240 | fct->reg = *reg; |
diff --git a/drivers/macintosh/windfarm_smu_sat.c b/drivers/macintosh/windfarm_smu_sat.c index 83f79de7174..9a6c2cf8fd0 100644 --- a/drivers/macintosh/windfarm_smu_sat.c +++ b/drivers/macintosh/windfarm_smu_sat.c | |||
@@ -241,7 +241,7 @@ static void wf_sat_create(struct i2c_adapter *adapter, struct device_node *dev) | |||
241 | char *name; | 241 | char *name; |
242 | int vsens[2], isens[2]; | 242 | int vsens[2], isens[2]; |
243 | 243 | ||
244 | reg = get_property(dev, "reg", NULL); | 244 | reg = of_get_property(dev, "reg", NULL); |
245 | if (reg == NULL) | 245 | if (reg == NULL) |
246 | return; | 246 | return; |
247 | addr = *reg; | 247 | addr = *reg; |
@@ -268,9 +268,9 @@ static void wf_sat_create(struct i2c_adapter *adapter, struct device_node *dev) | |||
268 | isens[0] = isens[1] = -1; | 268 | isens[0] = isens[1] = -1; |
269 | child = NULL; | 269 | child = NULL; |
270 | while ((child = of_get_next_child(dev, child)) != NULL) { | 270 | while ((child = of_get_next_child(dev, child)) != NULL) { |
271 | reg = get_property(child, "reg", NULL); | 271 | reg = of_get_property(child, "reg", NULL); |
272 | type = get_property(child, "device_type", NULL); | 272 | type = of_get_property(child, "device_type", NULL); |
273 | loc = get_property(child, "location", NULL); | 273 | loc = of_get_property(child, "location", NULL); |
274 | if (reg == NULL || loc == NULL) | 274 | if (reg == NULL || loc == NULL) |
275 | continue; | 275 | continue; |
276 | 276 | ||
diff --git a/drivers/macintosh/windfarm_smu_sensors.c b/drivers/macintosh/windfarm_smu_sensors.c index 01b4c50143d..9c567b93f41 100644 --- a/drivers/macintosh/windfarm_smu_sensors.c +++ b/drivers/macintosh/windfarm_smu_sensors.c | |||
@@ -204,8 +204,8 @@ static struct smu_ad_sensor *smu_ads_create(struct device_node *node) | |||
204 | ads = kmalloc(sizeof(struct smu_ad_sensor), GFP_KERNEL); | 204 | ads = kmalloc(sizeof(struct smu_ad_sensor), GFP_KERNEL); |
205 | if (ads == NULL) | 205 | if (ads == NULL) |
206 | return NULL; | 206 | return NULL; |
207 | c = get_property(node, "device_type", NULL); | 207 | c = of_get_property(node, "device_type", NULL); |
208 | l = get_property(node, "location", NULL); | 208 | l = of_get_property(node, "location", NULL); |
209 | if (c == NULL || l == NULL) | 209 | if (c == NULL || l == NULL) |
210 | goto fail; | 210 | goto fail; |
211 | 211 | ||
@@ -255,7 +255,7 @@ static struct smu_ad_sensor *smu_ads_create(struct device_node *node) | |||
255 | } else | 255 | } else |
256 | goto fail; | 256 | goto fail; |
257 | 257 | ||
258 | v = get_property(node, "reg", NULL); | 258 | v = of_get_property(node, "reg", NULL); |
259 | if (v == NULL) | 259 | if (v == NULL) |
260 | goto fail; | 260 | goto fail; |
261 | ads->reg = *v; | 261 | ads->reg = *v; |
diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c index 7efe744ad31..72107dc06d6 100644 --- a/drivers/mtd/maps/physmap_of.c +++ b/drivers/mtd/maps/physmap_of.c | |||
@@ -48,7 +48,7 @@ static int parse_flash_partitions(struct device_node *node, | |||
48 | const u32 *part; | 48 | const u32 *part; |
49 | const char *name; | 49 | const char *name; |
50 | 50 | ||
51 | part = get_property(node, "partitions", &plen); | 51 | part = of_get_property(node, "partitions", &plen); |
52 | if (part == NULL) | 52 | if (part == NULL) |
53 | goto err; | 53 | goto err; |
54 | 54 | ||
@@ -59,7 +59,7 @@ static int parse_flash_partitions(struct device_node *node, | |||
59 | goto err; | 59 | goto err; |
60 | } | 60 | } |
61 | 61 | ||
62 | name = get_property(node, "partition-names", &plen); | 62 | name = of_get_property(node, "partition-names", &plen); |
63 | 63 | ||
64 | for (i = 0; i < retval; i++) { | 64 | for (i = 0; i < retval; i++) { |
65 | (*parts)[i].offset = *part++; | 65 | (*parts)[i].offset = *part++; |
@@ -153,7 +153,7 @@ static int __devinit of_physmap_probe(struct of_device *dev, const struct of_dev | |||
153 | goto err_out; | 153 | goto err_out; |
154 | } | 154 | } |
155 | 155 | ||
156 | width = get_property(dp, "bank-width", NULL); | 156 | width = of_get_property(dp, "bank-width", NULL); |
157 | if (width == NULL) { | 157 | if (width == NULL) { |
158 | dev_err(&dev->dev, "Can't get the flash bank width!\n"); | 158 | dev_err(&dev->dev, "Can't get the flash bank width!\n"); |
159 | err = -EINVAL; | 159 | err = -EINVAL; |
@@ -174,7 +174,7 @@ static int __devinit of_physmap_probe(struct of_device *dev, const struct of_dev | |||
174 | 174 | ||
175 | simple_map_init(&info->map); | 175 | simple_map_init(&info->map); |
176 | 176 | ||
177 | of_probe = get_property(dp, "probe-type", NULL); | 177 | of_probe = of_get_property(dp, "probe-type", NULL); |
178 | if (of_probe == NULL) { | 178 | if (of_probe == NULL) { |
179 | probe_type = rom_probe_types; | 179 | probe_type = rom_probe_types; |
180 | for (; info->mtd == NULL && *probe_type != NULL; probe_type++) | 180 | for (; info->mtd == NULL && *probe_type != NULL; probe_type++) |
diff --git a/drivers/net/bmac.c b/drivers/net/bmac.c index c143304dcff..aa01ba347fe 100644 --- a/drivers/net/bmac.c +++ b/drivers/net/bmac.c | |||
@@ -1261,9 +1261,10 @@ static int __devinit bmac_probe(struct macio_dev *mdev, const struct of_device_i | |||
1261 | printk(KERN_ERR "BMAC: can't use, need 3 addrs and 3 intrs\n"); | 1261 | printk(KERN_ERR "BMAC: can't use, need 3 addrs and 3 intrs\n"); |
1262 | return -ENODEV; | 1262 | return -ENODEV; |
1263 | } | 1263 | } |
1264 | prop_addr = get_property(macio_get_of_node(mdev), "mac-address", NULL); | 1264 | prop_addr = of_get_property(macio_get_of_node(mdev), |
1265 | "mac-address", NULL); | ||
1265 | if (prop_addr == NULL) { | 1266 | if (prop_addr == NULL) { |
1266 | prop_addr = get_property(macio_get_of_node(mdev), | 1267 | prop_addr = of_get_property(macio_get_of_node(mdev), |
1267 | "local-mac-address", NULL); | 1268 | "local-mac-address", NULL); |
1268 | if (prop_addr == NULL) { | 1269 | if (prop_addr == NULL) { |
1269 | printk(KERN_ERR "BMAC: Can't get mac-address\n"); | 1270 | printk(KERN_ERR "BMAC: Can't get mac-address\n"); |
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index d1a8134c8e3..6d5effd8989 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c | |||
@@ -2336,7 +2336,7 @@ static int ehea_setup_single_port(struct ehea_port *port, | |||
2336 | port->of_dev_node = dn; | 2336 | port->of_dev_node = dn; |
2337 | 2337 | ||
2338 | /* Determine logical port id */ | 2338 | /* Determine logical port id */ |
2339 | dn_log_port_id = get_property(dn, "ibm,hea-port-no", NULL); | 2339 | dn_log_port_id = of_get_property(dn, "ibm,hea-port-no", NULL); |
2340 | 2340 | ||
2341 | if (!dn_log_port_id) { | 2341 | if (!dn_log_port_id) { |
2342 | ehea_error("bad device node: dn_log_port_id=%p", | 2342 | ehea_error("bad device node: dn_log_port_id=%p", |
@@ -2502,7 +2502,7 @@ static int __devinit ehea_probe(struct ibmebus_dev *dev, | |||
2502 | goto out; | 2502 | goto out; |
2503 | } | 2503 | } |
2504 | 2504 | ||
2505 | adapter_handle = get_property(dev->ofdev.node, "ibm,hea-handle", | 2505 | adapter_handle = of_get_property(dev->ofdev.node, "ibm,hea-handle", |
2506 | NULL); | 2506 | NULL); |
2507 | if (adapter_handle) | 2507 | if (adapter_handle) |
2508 | adapter->handle = *adapter_handle; | 2508 | adapter->handle = *adapter_handle; |
diff --git a/drivers/net/mace.c b/drivers/net/mace.c index 9ec24f0d5d6..7018ba92ce8 100644 --- a/drivers/net/mace.c +++ b/drivers/net/mace.c | |||
@@ -110,9 +110,9 @@ static int __devinit mace_probe(struct macio_dev *mdev, const struct of_device_i | |||
110 | return -ENODEV; | 110 | return -ENODEV; |
111 | } | 111 | } |
112 | 112 | ||
113 | addr = get_property(mace, "mac-address", NULL); | 113 | addr = of_get_property(mace, "mac-address", NULL); |
114 | if (addr == NULL) { | 114 | if (addr == NULL) { |
115 | addr = get_property(mace, "local-mac-address", NULL); | 115 | addr = of_get_property(mace, "local-mac-address", NULL); |
116 | if (addr == NULL) { | 116 | if (addr == NULL) { |
117 | printk(KERN_ERR "Can't get mac-address for MACE %s\n", | 117 | printk(KERN_ERR "Can't get mac-address for MACE %s\n", |
118 | mace->full_name); | 118 | mace->full_name); |
diff --git a/drivers/net/pasemi_mac.c b/drivers/net/pasemi_mac.c index d670ac74824..cb7a8e7729a 100644 --- a/drivers/net/pasemi_mac.c +++ b/drivers/net/pasemi_mac.c | |||
@@ -80,7 +80,7 @@ static int pasemi_get_mac_addr(struct pasemi_mac *mac) | |||
80 | return -ENOENT; | 80 | return -ENOENT; |
81 | } | 81 | } |
82 | 82 | ||
83 | maddr = get_property(dn, "mac-address", NULL); | 83 | maddr = of_get_property(dn, "mac-address", NULL); |
84 | if (maddr == NULL) { | 84 | if (maddr == NULL) { |
85 | dev_warn(&pdev->dev, | 85 | dev_warn(&pdev->dev, |
86 | "no mac address in device tree, not configuring\n"); | 86 | "no mac address in device tree, not configuring\n"); |
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c index 3b91af89e4c..698476154d8 100644 --- a/drivers/net/spider_net.c +++ b/drivers/net/spider_net.c | |||
@@ -1831,7 +1831,7 @@ try_host_fw: | |||
1831 | if (!dn) | 1831 | if (!dn) |
1832 | goto out_err; | 1832 | goto out_err; |
1833 | 1833 | ||
1834 | fw_prop = get_property(dn, "firmware", &fw_size); | 1834 | fw_prop = of_get_property(dn, "firmware", &fw_size); |
1835 | if (!fw_prop) | 1835 | if (!fw_prop) |
1836 | goto out_err; | 1836 | goto out_err; |
1837 | 1837 | ||
@@ -2237,7 +2237,7 @@ spider_net_setup_netdev(struct spider_net_card *card) | |||
2237 | if (!dn) | 2237 | if (!dn) |
2238 | return -EIO; | 2238 | return -EIO; |
2239 | 2239 | ||
2240 | mac = get_property(dn, "local-mac-address", NULL); | 2240 | mac = of_get_property(dn, "local-mac-address", NULL); |
2241 | if (!mac) | 2241 | if (!mac) |
2242 | return -EIO; | 2242 | return -EIO; |
2243 | memcpy(addr.sa_data, mac, ETH_ALEN); | 2243 | memcpy(addr.sa_data, mac, ETH_ALEN); |
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c index 08ea61db46f..6b1cd745af0 100644 --- a/drivers/net/sungem.c +++ b/drivers/net/sungem.c | |||
@@ -2929,7 +2929,7 @@ static int __devinit gem_get_device_address(struct gem *gp) | |||
2929 | #elif defined(CONFIG_PPC_PMAC) | 2929 | #elif defined(CONFIG_PPC_PMAC) |
2930 | const unsigned char *addr; | 2930 | const unsigned char *addr; |
2931 | 2931 | ||
2932 | addr = get_property(gp->of_node, "local-mac-address", NULL); | 2932 | addr = of_get_property(gp->of_node, "local-mac-address", NULL); |
2933 | if (addr == NULL) { | 2933 | if (addr == NULL) { |
2934 | printk("\n"); | 2934 | printk("\n"); |
2935 | printk(KERN_ERR "%s: can't get mac-address\n", dev->name); | 2935 | printk(KERN_ERR "%s: can't get mac-address\n", dev->name); |
diff --git a/drivers/net/sungem_phy.c b/drivers/net/sungem_phy.c index 56a110ca5e6..61843fd5752 100644 --- a/drivers/net/sungem_phy.c +++ b/drivers/net/sungem_phy.c | |||
@@ -451,7 +451,7 @@ static int bcm5421_init(struct mii_phy* phy) | |||
451 | if (phy->platform_data) { | 451 | if (phy->platform_data) { |
452 | struct device_node *np = of_get_parent(phy->platform_data); | 452 | struct device_node *np = of_get_parent(phy->platform_data); |
453 | int can_low_power = 1; | 453 | int can_low_power = 1; |
454 | if (np == NULL || get_property(np, "no-autolowpower", NULL)) | 454 | if (np == NULL || of_get_property(np, "no-autolowpower", NULL)) |
455 | can_low_power = 0; | 455 | can_low_power = 0; |
456 | if (can_low_power) { | 456 | if (can_low_power) { |
457 | /* Enable automatic low-power */ | 457 | /* Enable automatic low-power */ |
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index 639e1e6913b..12d394ffade 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c | |||
@@ -4080,16 +4080,16 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma | |||
4080 | 4080 | ||
4081 | ugeth_vdbg("%s: IN", __FUNCTION__); | 4081 | ugeth_vdbg("%s: IN", __FUNCTION__); |
4082 | 4082 | ||
4083 | prop = get_property(np, "device-id", NULL); | 4083 | prop = of_get_property(np, "device-id", NULL); |
4084 | ucc_num = *prop - 1; | 4084 | ucc_num = *prop - 1; |
4085 | if ((ucc_num < 0) || (ucc_num > 7)) | 4085 | if ((ucc_num < 0) || (ucc_num > 7)) |
4086 | return -ENODEV; | 4086 | return -ENODEV; |
4087 | 4087 | ||
4088 | ug_info = &ugeth_info[ucc_num]; | 4088 | ug_info = &ugeth_info[ucc_num]; |
4089 | ug_info->uf_info.ucc_num = ucc_num; | 4089 | ug_info->uf_info.ucc_num = ucc_num; |
4090 | prop = get_property(np, "rx-clock", NULL); | 4090 | prop = of_get_property(np, "rx-clock", NULL); |
4091 | ug_info->uf_info.rx_clock = *prop; | 4091 | ug_info->uf_info.rx_clock = *prop; |
4092 | prop = get_property(np, "tx-clock", NULL); | 4092 | prop = of_get_property(np, "tx-clock", NULL); |
4093 | ug_info->uf_info.tx_clock = *prop; | 4093 | ug_info->uf_info.tx_clock = *prop; |
4094 | err = of_address_to_resource(np, 0, &res); | 4094 | err = of_address_to_resource(np, 0, &res); |
4095 | if (err) | 4095 | if (err) |
@@ -4098,15 +4098,15 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma | |||
4098 | ug_info->uf_info.regs = res.start; | 4098 | ug_info->uf_info.regs = res.start; |
4099 | ug_info->uf_info.irq = irq_of_parse_and_map(np, 0); | 4099 | ug_info->uf_info.irq = irq_of_parse_and_map(np, 0); |
4100 | 4100 | ||
4101 | ph = get_property(np, "phy-handle", NULL); | 4101 | ph = of_get_property(np, "phy-handle", NULL); |
4102 | phy = of_find_node_by_phandle(*ph); | 4102 | phy = of_find_node_by_phandle(*ph); |
4103 | 4103 | ||
4104 | if (phy == NULL) | 4104 | if (phy == NULL) |
4105 | return -ENODEV; | 4105 | return -ENODEV; |
4106 | 4106 | ||
4107 | prop = get_property(phy, "reg", NULL); | 4107 | prop = of_get_property(phy, "reg", NULL); |
4108 | ug_info->phy_address = *prop; | 4108 | ug_info->phy_address = *prop; |
4109 | prop = get_property(phy, "interface", NULL); | 4109 | prop = of_get_property(phy, "interface", NULL); |
4110 | ug_info->enet_interface = *prop; | 4110 | ug_info->enet_interface = *prop; |
4111 | ug_info->phy_interrupt = irq_of_parse_and_map(phy, 0); | 4111 | ug_info->phy_interrupt = irq_of_parse_and_map(phy, 0); |
4112 | ug_info->board_flags = (ug_info->phy_interrupt == NO_IRQ)? | 4112 | ug_info->board_flags = (ug_info->phy_interrupt == NO_IRQ)? |
@@ -4127,7 +4127,7 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma | |||
4127 | /* timing. */ | 4127 | /* timing. */ |
4128 | /* The following compensates by writing to the reserved */ | 4128 | /* The following compensates by writing to the reserved */ |
4129 | /* QE Port Output Hold Registers (CPOH1?). */ | 4129 | /* QE Port Output Hold Registers (CPOH1?). */ |
4130 | prop = get_property(phy, "interface", NULL); | 4130 | prop = of_get_property(phy, "interface", NULL); |
4131 | phy_interface = *prop; | 4131 | phy_interface = *prop; |
4132 | if ((phy_interface == ENET_1000_RGMII) || | 4132 | if ((phy_interface == ENET_1000_RGMII) || |
4133 | (phy_interface == ENET_100_RGMII) || | 4133 | (phy_interface == ENET_100_RGMII) || |
@@ -4140,7 +4140,7 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma | |||
4140 | soc = of_find_node_by_type(NULL, "soc"); | 4140 | soc = of_find_node_by_type(NULL, "soc"); |
4141 | if (soc) { | 4141 | if (soc) { |
4142 | unsigned int size; | 4142 | unsigned int size; |
4143 | const void *prop = get_property(soc, "reg", &size); | 4143 | const void *prop = of_get_property(soc, "reg", &size); |
4144 | immrbase = of_translate_address(soc, prop); | 4144 | immrbase = of_translate_address(soc, prop); |
4145 | of_node_put(soc); | 4145 | of_node_put(soc); |
4146 | }; | 4146 | }; |
diff --git a/drivers/pci/hotplug/rpaphp_core.c b/drivers/pci/hotplug/rpaphp_core.c index 71a2cb8baa4..353da5b296e 100644 --- a/drivers/pci/hotplug/rpaphp_core.c +++ b/drivers/pci/hotplug/rpaphp_core.c | |||
@@ -182,10 +182,10 @@ static int get_children_props(struct device_node *dn, const int **drc_indexes, | |||
182 | { | 182 | { |
183 | const int *indexes, *names, *types, *domains; | 183 | const int *indexes, *names, *types, *domains; |
184 | 184 | ||
185 | indexes = get_property(dn, "ibm,drc-indexes", NULL); | 185 | indexes = of_get_property(dn, "ibm,drc-indexes", NULL); |
186 | names = get_property(dn, "ibm,drc-names", NULL); | 186 | names = of_get_property(dn, "ibm,drc-names", NULL); |
187 | types = get_property(dn, "ibm,drc-types", NULL); | 187 | types = of_get_property(dn, "ibm,drc-types", NULL); |
188 | domains = get_property(dn, "ibm,drc-power-domains", NULL); | 188 | domains = of_get_property(dn, "ibm,drc-power-domains", NULL); |
189 | 189 | ||
190 | if (!indexes || !names || !types || !domains) { | 190 | if (!indexes || !names || !types || !domains) { |
191 | /* Slot does not have dynamically-removable children */ | 191 | /* Slot does not have dynamically-removable children */ |
@@ -218,7 +218,7 @@ int rpaphp_get_drc_props(struct device_node *dn, int *drc_index, | |||
218 | char *name_tmp, *type_tmp; | 218 | char *name_tmp, *type_tmp; |
219 | int i, rc; | 219 | int i, rc; |
220 | 220 | ||
221 | my_index = get_property(dn, "ibm,my-drc-index", NULL); | 221 | my_index = of_get_property(dn, "ibm,my-drc-index", NULL); |
222 | if (!my_index) { | 222 | if (!my_index) { |
223 | /* Node isn't DLPAR/hotplug capable */ | 223 | /* Node isn't DLPAR/hotplug capable */ |
224 | return -EINVAL; | 224 | return -EINVAL; |
diff --git a/drivers/scsi/ibmvscsi/ibmvstgt.c b/drivers/scsi/ibmvscsi/ibmvstgt.c index f65f21da3fd..3fe831cdb74 100644 --- a/drivers/scsi/ibmvscsi/ibmvstgt.c +++ b/drivers/scsi/ibmvscsi/ibmvstgt.c | |||
@@ -903,16 +903,16 @@ static int get_system_info(void) | |||
903 | if (!rootdn) | 903 | if (!rootdn) |
904 | return -ENOENT; | 904 | return -ENOENT; |
905 | 905 | ||
906 | model = get_property(rootdn, "model", NULL); | 906 | model = of_get_property(rootdn, "model", NULL); |
907 | id = get_property(rootdn, "system-id", NULL); | 907 | id = of_get_property(rootdn, "system-id", NULL); |
908 | if (model && id) | 908 | if (model && id) |
909 | snprintf(system_id, sizeof(system_id), "%s-%s", model, id); | 909 | snprintf(system_id, sizeof(system_id), "%s-%s", model, id); |
910 | 910 | ||
911 | name = get_property(rootdn, "ibm,partition-name", NULL); | 911 | name = of_get_property(rootdn, "ibm,partition-name", NULL); |
912 | if (name) | 912 | if (name) |
913 | strncpy(partition_name, name, sizeof(partition_name)); | 913 | strncpy(partition_name, name, sizeof(partition_name)); |
914 | 914 | ||
915 | num = get_property(rootdn, "ibm,partition-no", NULL); | 915 | num = of_get_property(rootdn, "ibm,partition-no", NULL); |
916 | if (num) | 916 | if (num) |
917 | partition_number = *num; | 917 | partition_number = *num; |
918 | 918 | ||
diff --git a/drivers/scsi/ibmvscsi/rpa_vscsi.c b/drivers/scsi/ibmvscsi/rpa_vscsi.c index 227c0f2f4d7..9bbb69ca73e 100644 --- a/drivers/scsi/ibmvscsi/rpa_vscsi.c +++ b/drivers/scsi/ibmvscsi/rpa_vscsi.c | |||
@@ -162,11 +162,11 @@ static void gather_partition_info(void) | |||
162 | return; | 162 | return; |
163 | } | 163 | } |
164 | 164 | ||
165 | ppartition_name = get_property(rootdn, "ibm,partition-name", NULL); | 165 | ppartition_name = of_get_property(rootdn, "ibm,partition-name", NULL); |
166 | if (ppartition_name) | 166 | if (ppartition_name) |
167 | strncpy(partition_name, ppartition_name, | 167 | strncpy(partition_name, ppartition_name, |
168 | sizeof(partition_name)); | 168 | sizeof(partition_name)); |
169 | p_number_ptr = get_property(rootdn, "ibm,partition-no", NULL); | 169 | p_number_ptr = of_get_property(rootdn, "ibm,partition-no", NULL); |
170 | if (p_number_ptr) | 170 | if (p_number_ptr) |
171 | partition_number = *p_number_ptr; | 171 | partition_number = *p_number_ptr; |
172 | } | 172 | } |
diff --git a/drivers/scsi/mac53c94.c b/drivers/scsi/mac53c94.c index 753d88306cd..5806ede120a 100644 --- a/drivers/scsi/mac53c94.c +++ b/drivers/scsi/mac53c94.c | |||
@@ -471,7 +471,7 @@ static int mac53c94_probe(struct macio_dev *mdev, const struct of_device_id *mat | |||
471 | goto out_free; | 471 | goto out_free; |
472 | } | 472 | } |
473 | 473 | ||
474 | clkprop = get_property(node, "clock-frequency", &proplen); | 474 | clkprop = of_get_property(node, "clock-frequency", &proplen); |
475 | if (clkprop == NULL || proplen != sizeof(int)) { | 475 | if (clkprop == NULL || proplen != sizeof(int)) { |
476 | printk(KERN_ERR "%s: can't get clock frequency, " | 476 | printk(KERN_ERR "%s: can't get clock frequency, " |
477 | "assuming 25MHz\n", node->full_name); | 477 | "assuming 25MHz\n", node->full_name); |
diff --git a/drivers/scsi/mesh.c b/drivers/scsi/mesh.c index 1fd3c7590d3..cf3666d7d97 100644 --- a/drivers/scsi/mesh.c +++ b/drivers/scsi/mesh.c | |||
@@ -1947,7 +1947,7 @@ static int mesh_probe(struct macio_dev *mdev, const struct of_device_id *match) | |||
1947 | ms->tgts[tgt].current_req = NULL; | 1947 | ms->tgts[tgt].current_req = NULL; |
1948 | } | 1948 | } |
1949 | 1949 | ||
1950 | if ((cfp = get_property(mesh, "clock-frequency", NULL))) | 1950 | if ((cfp = of_get_property(mesh, "clock-frequency", NULL))) |
1951 | ms->clk_freq = *cfp; | 1951 | ms->clk_freq = *cfp; |
1952 | else { | 1952 | else { |
1953 | printk(KERN_INFO "mesh: assuming 50MHz clock frequency\n"); | 1953 | printk(KERN_INFO "mesh: assuming 50MHz clock frequency\n"); |
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c index 8d24cd52105..f8c1761eb57 100644 --- a/drivers/serial/mpc52xx_uart.c +++ b/drivers/serial/mpc52xx_uart.c | |||
@@ -1069,7 +1069,7 @@ mpc52xx_uart_of_enumerate(void) | |||
1069 | continue; | 1069 | continue; |
1070 | 1070 | ||
1071 | /* Is a particular device number requested? */ | 1071 | /* Is a particular device number requested? */ |
1072 | devno = get_property(np, "port-number", NULL); | 1072 | devno = of_get_property(np, "port-number", NULL); |
1073 | mpc52xx_uart_of_assign(of_node_get(np), devno ? *devno : -1); | 1073 | mpc52xx_uart_of_assign(of_node_get(np), devno ? *devno : -1); |
1074 | } | 1074 | } |
1075 | 1075 | ||
diff --git a/drivers/serial/of_serial.c b/drivers/serial/of_serial.c index 09b0b736a75..e7928fee833 100644 --- a/drivers/serial/of_serial.c +++ b/drivers/serial/of_serial.c | |||
@@ -29,8 +29,8 @@ static int __devinit of_platform_serial_setup(struct of_device *ofdev, | |||
29 | int ret; | 29 | int ret; |
30 | 30 | ||
31 | memset(port, 0, sizeof *port); | 31 | memset(port, 0, sizeof *port); |
32 | spd = get_property(np, "current-speed", NULL); | 32 | spd = of_get_property(np, "current-speed", NULL); |
33 | clk = get_property(np, "clock-frequency", NULL); | 33 | clk = of_get_property(np, "clock-frequency", NULL); |
34 | if (!clk) { | 34 | if (!clk) { |
35 | dev_warn(&ofdev->dev, "no clock-frequency property set\n"); | 35 | dev_warn(&ofdev->dev, "no clock-frequency property set\n"); |
36 | return -ENODEV; | 36 | return -ENODEV; |
diff --git a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c index 752ef07516b..2b163c532e0 100644 --- a/drivers/serial/pmac_zilog.c +++ b/drivers/serial/pmac_zilog.c | |||
@@ -1452,12 +1452,12 @@ no_dma: | |||
1452 | */ | 1452 | */ |
1453 | if (device_is_compatible(np, "cobalt")) | 1453 | if (device_is_compatible(np, "cobalt")) |
1454 | uap->flags |= PMACZILOG_FLAG_IS_INTMODEM; | 1454 | uap->flags |= PMACZILOG_FLAG_IS_INTMODEM; |
1455 | conn = get_property(np, "AAPL,connector", &len); | 1455 | conn = of_get_property(np, "AAPL,connector", &len); |
1456 | if (conn && (strcmp(conn, "infrared") == 0)) | 1456 | if (conn && (strcmp(conn, "infrared") == 0)) |
1457 | uap->flags |= PMACZILOG_FLAG_IS_IRDA; | 1457 | uap->flags |= PMACZILOG_FLAG_IS_IRDA; |
1458 | uap->port_type = PMAC_SCC_ASYNC; | 1458 | uap->port_type = PMAC_SCC_ASYNC; |
1459 | /* 1999 Powerbook G3 has slot-names property instead */ | 1459 | /* 1999 Powerbook G3 has slot-names property instead */ |
1460 | slots = get_property(np, "slot-names", &len); | 1460 | slots = of_get_property(np, "slot-names", &len); |
1461 | if (slots && slots->count > 0) { | 1461 | if (slots && slots->count > 0) { |
1462 | if (strcmp(slots->name, "IrDA") == 0) | 1462 | if (strcmp(slots->name, "IrDA") == 0) |
1463 | uap->flags |= PMACZILOG_FLAG_IS_IRDA; | 1463 | uap->flags |= PMACZILOG_FLAG_IS_IRDA; |
@@ -1470,7 +1470,7 @@ no_dma: | |||
1470 | struct device_node* i2c_modem = find_devices("i2c-modem"); | 1470 | struct device_node* i2c_modem = find_devices("i2c-modem"); |
1471 | if (i2c_modem) { | 1471 | if (i2c_modem) { |
1472 | const char* mid = | 1472 | const char* mid = |
1473 | get_property(i2c_modem, "modem-id", NULL); | 1473 | of_get_property(i2c_modem, "modem-id", NULL); |
1474 | if (mid) switch(*mid) { | 1474 | if (mid) switch(*mid) { |
1475 | case 0x04 : | 1475 | case 0x04 : |
1476 | case 0x05 : | 1476 | case 0x05 : |
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c index 1bf6f42eb40..497263038d1 100644 --- a/drivers/video/aty/radeon_base.c +++ b/drivers/video/aty/radeon_base.c | |||
@@ -422,7 +422,7 @@ static int __devinit radeon_read_xtal_OF (struct radeonfb_info *rinfo) | |||
422 | 422 | ||
423 | if (dp == NULL) | 423 | if (dp == NULL) |
424 | return -ENODEV; | 424 | return -ENODEV; |
425 | val = get_property(dp, "ATY,RefCLK", NULL); | 425 | val = of_get_property(dp, "ATY,RefCLK", NULL); |
426 | if (!val || !*val) { | 426 | if (!val || !*val) { |
427 | printk(KERN_WARNING "radeonfb: No ATY,RefCLK property !\n"); | 427 | printk(KERN_WARNING "radeonfb: No ATY,RefCLK property !\n"); |
428 | return -EINVAL; | 428 | return -EINVAL; |
@@ -430,11 +430,11 @@ static int __devinit radeon_read_xtal_OF (struct radeonfb_info *rinfo) | |||
430 | 430 | ||
431 | rinfo->pll.ref_clk = (*val) / 10; | 431 | rinfo->pll.ref_clk = (*val) / 10; |
432 | 432 | ||
433 | val = get_property(dp, "ATY,SCLK", NULL); | 433 | val = of_get_property(dp, "ATY,SCLK", NULL); |
434 | if (val && *val) | 434 | if (val && *val) |
435 | rinfo->pll.sclk = (*val) / 10; | 435 | rinfo->pll.sclk = (*val) / 10; |
436 | 436 | ||
437 | val = get_property(dp, "ATY,MCLK", NULL); | 437 | val = of_get_property(dp, "ATY,MCLK", NULL); |
438 | if (val && *val) | 438 | if (val && *val) |
439 | rinfo->pll.mclk = (*val) / 10; | 439 | rinfo->pll.mclk = (*val) / 10; |
440 | 440 | ||
diff --git a/drivers/video/aty/radeon_monitor.c b/drivers/video/aty/radeon_monitor.c index 38c7dbf8c15..ec7a5d4c76d 100644 --- a/drivers/video/aty/radeon_monitor.c +++ b/drivers/video/aty/radeon_monitor.c | |||
@@ -65,12 +65,12 @@ static int __devinit radeon_parse_montype_prop(struct device_node *dp, u8 **out_ | |||
65 | static char *propnames[] = { "DFP,EDID", "LCD,EDID", "EDID", | 65 | static char *propnames[] = { "DFP,EDID", "LCD,EDID", "EDID", |
66 | "EDID1", "EDID2", NULL }; | 66 | "EDID1", "EDID2", NULL }; |
67 | const u8 *pedid = NULL; | 67 | const u8 *pedid = NULL; |
68 | const u8 *pmt = NULL; | 68 | const u8 *pmt; |
69 | u8 *tmp; | 69 | u8 *tmp; |
70 | int i, mt = MT_NONE; | 70 | int i, mt = MT_NONE; |
71 | 71 | ||
72 | RTRACE("analyzing OF properties...\n"); | 72 | RTRACE("analyzing OF properties...\n"); |
73 | pmt = get_property(dp, "display-type", NULL); | 73 | pmt = of_get_property(dp, "display-type", NULL); |
74 | if (!pmt) | 74 | if (!pmt) |
75 | return MT_NONE; | 75 | return MT_NONE; |
76 | RTRACE("display-type: %s\n", pmt); | 76 | RTRACE("display-type: %s\n", pmt); |
@@ -89,7 +89,7 @@ static int __devinit radeon_parse_montype_prop(struct device_node *dp, u8 **out_ | |||
89 | } | 89 | } |
90 | 90 | ||
91 | for (i = 0; propnames[i] != NULL; ++i) { | 91 | for (i = 0; propnames[i] != NULL; ++i) { |
92 | pedid = get_property(dp, propnames[i], NULL); | 92 | pedid = of_get_property(dp, propnames[i], NULL); |
93 | if (pedid != NULL) | 93 | if (pedid != NULL) |
94 | break; | 94 | break; |
95 | } | 95 | } |
@@ -98,9 +98,10 @@ static int __devinit radeon_parse_montype_prop(struct device_node *dp, u8 **out_ | |||
98 | * single-head cards have hdno == -1 and skip this step | 98 | * single-head cards have hdno == -1 and skip this step |
99 | */ | 99 | */ |
100 | if (pedid == NULL && dp->parent && (hdno != -1)) | 100 | if (pedid == NULL && dp->parent && (hdno != -1)) |
101 | pedid = get_property(dp->parent, (hdno == 0) ? "EDID1" : "EDID2", NULL); | 101 | pedid = of_get_property(dp->parent, |
102 | (hdno == 0) ? "EDID1" : "EDID2", NULL); | ||
102 | if (pedid == NULL && dp->parent && (hdno == 0)) | 103 | if (pedid == NULL && dp->parent && (hdno == 0)) |
103 | pedid = get_property(dp->parent, "EDID", NULL); | 104 | pedid = of_get_property(dp->parent, "EDID", NULL); |
104 | if (pedid == NULL) | 105 | if (pedid == NULL) |
105 | return mt; | 106 | return mt; |
106 | 107 | ||
@@ -130,7 +131,7 @@ static int __devinit radeon_probe_OF_head(struct radeonfb_info *rinfo, int head_ | |||
130 | do { | 131 | do { |
131 | if (!dp) | 132 | if (!dp) |
132 | return MT_NONE; | 133 | return MT_NONE; |
133 | pname = get_property(dp, "name", NULL); | 134 | pname = of_get_property(dp, "name", NULL); |
134 | if (!pname) | 135 | if (!pname) |
135 | return MT_NONE; | 136 | return MT_NONE; |
136 | len = strlen(pname); | 137 | len = strlen(pname); |
diff --git a/drivers/video/aty/radeon_pm.c b/drivers/video/aty/radeon_pm.c index c411293cefc..1786ae18832 100644 --- a/drivers/video/aty/radeon_pm.c +++ b/drivers/video/aty/radeon_pm.c | |||
@@ -1290,7 +1290,7 @@ static void radeon_pm_full_reset_sdram(struct radeonfb_info *rinfo) | |||
1290 | if (rinfo->of_node != NULL) { | 1290 | if (rinfo->of_node != NULL) { |
1291 | int size; | 1291 | int size; |
1292 | 1292 | ||
1293 | mrtable = get_property(rinfo->of_node, "ATY,MRT", &size); | 1293 | mrtable = of_get_property(rinfo->of_node, "ATY,MRT", &size); |
1294 | if (mrtable) | 1294 | if (mrtable) |
1295 | mrtable_size = size >> 2; | 1295 | mrtable_size = size >> 2; |
1296 | else | 1296 | else |
diff --git a/drivers/video/nvidia/nv_of.c b/drivers/video/nvidia/nv_of.c index 163a774a1b3..73afd7eb997 100644 --- a/drivers/video/nvidia/nv_of.c +++ b/drivers/video/nvidia/nv_of.c | |||
@@ -46,15 +46,15 @@ int nvidia_probe_of_connector(struct fb_info *info, int conn, u8 **out_edid) | |||
46 | 46 | ||
47 | for (dp = NULL; | 47 | for (dp = NULL; |
48 | (dp = of_get_next_child(parent, dp)) != NULL;) { | 48 | (dp = of_get_next_child(parent, dp)) != NULL;) { |
49 | pname = get_property(dp, "name", NULL); | 49 | pname = of_get_property(dp, "name", NULL); |
50 | if (!pname) | 50 | if (!pname) |
51 | continue; | 51 | continue; |
52 | len = strlen(pname); | 52 | len = strlen(pname); |
53 | if ((pname[len-1] == 'A' && conn == 1) || | 53 | if ((pname[len-1] == 'A' && conn == 1) || |
54 | (pname[len-1] == 'B' && conn == 2)) { | 54 | (pname[len-1] == 'B' && conn == 2)) { |
55 | for (i = 0; propnames[i] != NULL; ++i) { | 55 | for (i = 0; propnames[i] != NULL; ++i) { |
56 | pedid = get_property(dp, propnames[i], | 56 | pedid = of_get_property(dp, |
57 | NULL); | 57 | propnames[i], NULL); |
58 | if (pedid != NULL) | 58 | if (pedid != NULL) |
59 | break; | 59 | break; |
60 | } | 60 | } |
@@ -65,7 +65,7 @@ int nvidia_probe_of_connector(struct fb_info *info, int conn, u8 **out_edid) | |||
65 | } | 65 | } |
66 | if (pedid == NULL) { | 66 | if (pedid == NULL) { |
67 | for (i = 0; propnames[i] != NULL; ++i) { | 67 | for (i = 0; propnames[i] != NULL; ++i) { |
68 | pedid = get_property(parent, propnames[i], NULL); | 68 | pedid = of_get_property(parent, propnames[i], NULL); |
69 | if (pedid != NULL) | 69 | if (pedid != NULL) |
70 | break; | 70 | break; |
71 | } | 71 | } |
diff --git a/drivers/video/offb.c b/drivers/video/offb.c index 9576a55eaf1..3cf603c0127 100644 --- a/drivers/video/offb.c +++ b/drivers/video/offb.c | |||
@@ -425,27 +425,27 @@ static void __init offb_init_nodriver(struct device_node *dp, int no_real_node) | |||
425 | const u32 *pp, *addrp, *up; | 425 | const u32 *pp, *addrp, *up; |
426 | u64 asize; | 426 | u64 asize; |
427 | 427 | ||
428 | pp = get_property(dp, "linux,bootx-depth", &len); | 428 | pp = of_get_property(dp, "linux,bootx-depth", &len); |
429 | if (pp == NULL) | 429 | if (pp == NULL) |
430 | pp = get_property(dp, "depth", &len); | 430 | pp = of_get_property(dp, "depth", &len); |
431 | if (pp && len == sizeof(u32)) | 431 | if (pp && len == sizeof(u32)) |
432 | depth = *pp; | 432 | depth = *pp; |
433 | 433 | ||
434 | pp = get_property(dp, "linux,bootx-width", &len); | 434 | pp = of_get_property(dp, "linux,bootx-width", &len); |
435 | if (pp == NULL) | 435 | if (pp == NULL) |
436 | pp = get_property(dp, "width", &len); | 436 | pp = of_get_property(dp, "width", &len); |
437 | if (pp && len == sizeof(u32)) | 437 | if (pp && len == sizeof(u32)) |
438 | width = *pp; | 438 | width = *pp; |
439 | 439 | ||
440 | pp = get_property(dp, "linux,bootx-height", &len); | 440 | pp = of_get_property(dp, "linux,bootx-height", &len); |
441 | if (pp == NULL) | 441 | if (pp == NULL) |
442 | pp = get_property(dp, "height", &len); | 442 | pp = of_get_property(dp, "height", &len); |
443 | if (pp && len == sizeof(u32)) | 443 | if (pp && len == sizeof(u32)) |
444 | height = *pp; | 444 | height = *pp; |
445 | 445 | ||
446 | pp = get_property(dp, "linux,bootx-linebytes", &len); | 446 | pp = of_get_property(dp, "linux,bootx-linebytes", &len); |
447 | if (pp == NULL) | 447 | if (pp == NULL) |
448 | pp = get_property(dp, "linebytes", &len); | 448 | pp = of_get_property(dp, "linebytes", &len); |
449 | if (pp && len == sizeof(u32) && (*pp != 0xffffffffu)) | 449 | if (pp && len == sizeof(u32) && (*pp != 0xffffffffu)) |
450 | pitch = *pp; | 450 | pitch = *pp; |
451 | else | 451 | else |
@@ -463,9 +463,9 @@ static void __init offb_init_nodriver(struct device_node *dp, int no_real_node) | |||
463 | * ranges and pick one that is both big enough and if possible encloses | 463 | * ranges and pick one that is both big enough and if possible encloses |
464 | * the "address" property. If none match, we pick the biggest | 464 | * the "address" property. If none match, we pick the biggest |
465 | */ | 465 | */ |
466 | up = get_property(dp, "linux,bootx-addr", &len); | 466 | up = of_get_property(dp, "linux,bootx-addr", &len); |
467 | if (up == NULL) | 467 | if (up == NULL) |
468 | up = get_property(dp, "address", &len); | 468 | up = of_get_property(dp, "address", &len); |
469 | if (up && len == sizeof(u32)) | 469 | if (up && len == sizeof(u32)) |
470 | addr_prop = *up; | 470 | addr_prop = *up; |
471 | 471 | ||
@@ -521,7 +521,7 @@ static int __init offb_init(void) | |||
521 | return -ENODEV; | 521 | return -ENODEV; |
522 | 522 | ||
523 | /* Check if we have a MacOS display without a node spec */ | 523 | /* Check if we have a MacOS display without a node spec */ |
524 | if (get_property(of_chosen, "linux,bootx-noscreen", NULL) != NULL) { | 524 | if (of_get_property(of_chosen, "linux,bootx-noscreen", NULL) != NULL) { |
525 | /* The old code tried to work out which node was the MacOS | 525 | /* The old code tried to work out which node was the MacOS |
526 | * display based on the address. I'm dropping that since the | 526 | * display based on the address. I'm dropping that since the |
527 | * lack of a node spec only happens with old BootX versions | 527 | * lack of a node spec only happens with old BootX versions |
@@ -532,14 +532,14 @@ static int __init offb_init(void) | |||
532 | } | 532 | } |
533 | 533 | ||
534 | for (dp = NULL; (dp = of_find_node_by_type(dp, "display"));) { | 534 | for (dp = NULL; (dp = of_find_node_by_type(dp, "display"));) { |
535 | if (get_property(dp, "linux,opened", NULL) && | 535 | if (of_get_property(dp, "linux,opened", NULL) && |
536 | get_property(dp, "linux,boot-display", NULL)) { | 536 | of_get_property(dp, "linux,boot-display", NULL)) { |
537 | boot_disp = dp; | 537 | boot_disp = dp; |
538 | offb_init_nodriver(dp, 0); | 538 | offb_init_nodriver(dp, 0); |
539 | } | 539 | } |
540 | } | 540 | } |
541 | for (dp = NULL; (dp = of_find_node_by_type(dp, "display"));) { | 541 | for (dp = NULL; (dp = of_find_node_by_type(dp, "display"));) { |
542 | if (get_property(dp, "linux,opened", NULL) && | 542 | if (of_get_property(dp, "linux,opened", NULL) && |
543 | dp != boot_disp) | 543 | dp != boot_disp) |
544 | offb_init_nodriver(dp, 0); | 544 | offb_init_nodriver(dp, 0); |
545 | } | 545 | } |
diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c index d7ece8d17a2..9c6bd099185 100644 --- a/drivers/video/riva/fbdev.c +++ b/drivers/video/riva/fbdev.c | |||
@@ -1760,13 +1760,13 @@ static int __devinit riva_get_EDID_OF(struct fb_info *info, struct pci_dev *pd) | |||
1760 | NVTRACE_ENTER(); | 1760 | NVTRACE_ENTER(); |
1761 | dp = pci_device_to_OF_node(pd); | 1761 | dp = pci_device_to_OF_node(pd); |
1762 | for (; dp != NULL; dp = dp->child) { | 1762 | for (; dp != NULL; dp = dp->child) { |
1763 | disptype = get_property(dp, "display-type", NULL); | 1763 | disptype = of_get_property(dp, "display-type", NULL); |
1764 | if (disptype == NULL) | 1764 | if (disptype == NULL) |
1765 | continue; | 1765 | continue; |
1766 | if (strncmp(disptype, "LCD", 3) != 0) | 1766 | if (strncmp(disptype, "LCD", 3) != 0) |
1767 | continue; | 1767 | continue; |
1768 | for (i = 0; propnames[i] != NULL; ++i) { | 1768 | for (i = 0; propnames[i] != NULL; ++i) { |
1769 | pedid = get_property(dp, propnames[i], NULL); | 1769 | pedid = of_get_property(dp, propnames[i], NULL); |
1770 | if (pedid != NULL) { | 1770 | if (pedid != NULL) { |
1771 | par->EDID = (unsigned char *)pedid; | 1771 | par->EDID = (unsigned char *)pedid; |
1772 | NVTRACE("LCD found.\n"); | 1772 | NVTRACE("LCD found.\n"); |