diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2007-04-26 23:41:15 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-04-27 01:51:56 -0400 |
commit | 01b2726dd11ef198ac6cf8f88974b4427d40ffdb (patch) | |
tree | 55d37172978ce18678e381b0388e51c93e911565 /drivers | |
parent | a48141db68e4b9143759435badcc1a49d9022db4 (diff) |
[POWERPC] Rename get_property to of_get_property: partial drivers
This does drivers/machintosh and the hvc code.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/hvc_iseries.c | 2 | ||||
-rw-r--r-- | drivers/char/hvc_vio.c | 2 | ||||
-rw-r--r-- | drivers/char/hvsi.c | 4 | ||||
-rw-r--r-- | drivers/macintosh/macio_asic.c | 2 | ||||
-rw-r--r-- | drivers/macintosh/macio_sysfs.c | 4 | ||||
-rw-r--r-- | drivers/macintosh/rack-meter.c | 2 | ||||
-rw-r--r-- | drivers/macintosh/smu.c | 6 | ||||
-rw-r--r-- | drivers/macintosh/therm_adt746x.c | 8 | ||||
-rw-r--r-- | drivers/macintosh/therm_pm72.c | 8 | ||||
-rw-r--r-- | drivers/macintosh/therm_windtunnel.c | 2 | ||||
-rw-r--r-- | drivers/macintosh/via-cuda.c | 2 | ||||
-rw-r--r-- | drivers/macintosh/via-pmu-led.c | 2 | ||||
-rw-r--r-- | drivers/macintosh/via-pmu.c | 6 | ||||
-rw-r--r-- | drivers/macintosh/windfarm_lm75_sensor.c | 2 | ||||
-rw-r--r-- | drivers/macintosh/windfarm_max6690_sensor.c | 2 | ||||
-rw-r--r-- | drivers/macintosh/windfarm_smu_controls.c | 8 | ||||
-rw-r--r-- | drivers/macintosh/windfarm_smu_sat.c | 8 | ||||
-rw-r--r-- | drivers/macintosh/windfarm_smu_sensors.c | 6 |
18 files changed, 38 insertions, 38 deletions
diff --git a/drivers/char/hvc_iseries.c b/drivers/char/hvc_iseries.c index f144a947bd17..ec420fe8a908 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 f9c00844d2bf..94a542e20efb 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 50315d6364fd..d5a752da322f 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/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c index e851266a2db1..c96b7fe882a4 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 0a5647fb8569..cc8267912656 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 f83fad2a3ff4..4177ff004753 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 45bb3c1dfeb1..135f22eb1ad4 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 a7ce55926638..228903403cfc 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 2e4ad44a8636..78ff18617139 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 a1d3a987cb3a..35233de460ad 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 d58fcf6cca0a..76d21775fc35 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 f8d7a460c9a8..fc89a7047cd0 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 8470210db7f6..1729d3fd7a11 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; |
@@ -334,7 +334,7 @@ int __init find_via_pmu(void) | |||
334 | 334 | ||
335 | gpiop = of_find_node_by_name(NULL, "gpio"); | 335 | gpiop = of_find_node_by_name(NULL, "gpio"); |
336 | if (gpiop) { | 336 | if (gpiop) { |
337 | reg = get_property(gpiop, "reg", NULL); | 337 | reg = of_get_property(gpiop, "reg", NULL); |
338 | if (reg) | 338 | if (reg) |
339 | gaddr = of_translate_address(gpiop, reg); | 339 | gaddr = of_translate_address(gpiop, reg); |
340 | if (gaddr != OF_BAD_ADDR) | 340 | if (gaddr != OF_BAD_ADDR) |
@@ -491,7 +491,7 @@ static int __init via_pmu_dev_init(void) | |||
491 | of_find_node_by_name(NULL, "power-mgt"); | 491 | of_find_node_by_name(NULL, "power-mgt"); |
492 | const u32 *prim_info = NULL; | 492 | const u32 *prim_info = NULL; |
493 | if (prim) | 493 | if (prim) |
494 | prim_info = get_property(prim, "prim-info", NULL); | 494 | prim_info = of_get_property(prim, "prim-info", NULL); |
495 | if (prim_info) { | 495 | if (prim_info) { |
496 | /* Other stuffs here yet unknown */ | 496 | /* Other stuffs here yet unknown */ |
497 | pmu_battery_count = (prim_info[6] >> 16) & 0xff; | 497 | 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 3f7967feaf5b..ab4d1b63f63e 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 eae1189d6c41..eaa74afa175b 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 31b750d61206..ff398adc0283 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 83f79de7174b..9a6c2cf8fd0e 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 01b4c50143dd..9c567b93f417 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; |