diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2007-04-03 08:26:41 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-04-12 13:55:19 -0400 |
commit | e2eb63927bfcb54232163bfec32440246fd44457 (patch) | |
tree | 596656edeb2332b5134d8236fa50b87f2c0ece29 /arch/powerpc/kernel/ibmebus.c | |
parent | ceef87782a9452eeeca774e65d7f4e06455780a3 (diff) |
[POWERPC] Rename get_property to of_get_property: arch/powerpc
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 'arch/powerpc/kernel/ibmebus.c')
-rw-r--r-- | arch/powerpc/kernel/ibmebus.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c index 8ed1163c0bd4..48446a699ef8 100644 --- a/arch/powerpc/kernel/ibmebus.c +++ b/arch/powerpc/kernel/ibmebus.c | |||
@@ -193,7 +193,7 @@ static struct ibmebus_dev* __devinit ibmebus_register_device_node( | |||
193 | const char *loc_code; | 193 | const char *loc_code; |
194 | int length; | 194 | int length; |
195 | 195 | ||
196 | loc_code = get_property(dn, "ibm,loc-code", NULL); | 196 | loc_code = of_get_property(dn, "ibm,loc-code", NULL); |
197 | if (!loc_code) { | 197 | if (!loc_code) { |
198 | printk(KERN_WARNING "%s: node %s missing 'ibm,loc-code'\n", | 198 | printk(KERN_WARNING "%s: node %s missing 'ibm,loc-code'\n", |
199 | __FUNCTION__, dn->name ? dn->name : "<unknown>"); | 199 | __FUNCTION__, dn->name ? dn->name : "<unknown>"); |
@@ -256,12 +256,11 @@ static void ibmebus_add_devices_by_id(struct of_device_id *idt) | |||
256 | static int ibmebus_match_helper_name(struct device *dev, void *data) | 256 | static int ibmebus_match_helper_name(struct device *dev, void *data) |
257 | { | 257 | { |
258 | const struct ibmebus_dev *ebus_dev = to_ibmebus_dev(dev); | 258 | const struct ibmebus_dev *ebus_dev = to_ibmebus_dev(dev); |
259 | char *name; | 259 | const char *name; |
260 | 260 | ||
261 | name = (char*)get_property( | 261 | name = of_get_property(ebus_dev->ofdev.node, "name", NULL); |
262 | ebus_dev->ofdev.node, "name", NULL); | ||
263 | 262 | ||
264 | if (name && (strcmp((char*)data, name) == 0)) | 263 | if (name && (strcmp(data, name) == 0)) |
265 | return 1; | 264 | return 1; |
266 | 265 | ||
267 | return 0; | 266 | return 0; |
@@ -363,7 +362,7 @@ static ssize_t name_show(struct device *dev, | |||
363 | struct device_attribute *attr, char *buf) | 362 | struct device_attribute *attr, char *buf) |
364 | { | 363 | { |
365 | struct ibmebus_dev *ebus_dev = to_ibmebus_dev(dev); | 364 | struct ibmebus_dev *ebus_dev = to_ibmebus_dev(dev); |
366 | char *name = (char*)get_property(ebus_dev->ofdev.node, "name", NULL); | 365 | const char *name = of_get_property(ebus_dev->ofdev.node, "name", NULL); |
367 | return sprintf(buf, "%s\n", name); | 366 | return sprintf(buf, "%s\n", name); |
368 | } | 367 | } |
369 | 368 | ||
@@ -375,12 +374,11 @@ static struct device_attribute ibmebus_dev_attrs[] = { | |||
375 | static int ibmebus_match_helper_loc_code(struct device *dev, void *data) | 374 | static int ibmebus_match_helper_loc_code(struct device *dev, void *data) |
376 | { | 375 | { |
377 | const struct ibmebus_dev *ebus_dev = to_ibmebus_dev(dev); | 376 | const struct ibmebus_dev *ebus_dev = to_ibmebus_dev(dev); |
378 | char *loc_code; | 377 | const char *loc_code; |
379 | 378 | ||
380 | loc_code = (char*)get_property( | 379 | loc_code = of_get_property(ebus_dev->ofdev.node, "ibm,loc-code", NULL); |
381 | ebus_dev->ofdev.node, "ibm,loc-code", NULL); | ||
382 | 380 | ||
383 | if (loc_code && (strcmp((char*)data, loc_code) == 0)) | 381 | if (loc_code && (strcmp(data, loc_code) == 0)) |
384 | return 1; | 382 | return 1; |
385 | 383 | ||
386 | return 0; | 384 | return 0; |
@@ -391,7 +389,7 @@ static ssize_t ibmebus_store_probe(struct bus_type *bus, | |||
391 | { | 389 | { |
392 | struct device_node *dn = NULL; | 390 | struct device_node *dn = NULL; |
393 | struct ibmebus_dev *dev; | 391 | struct ibmebus_dev *dev; |
394 | char *loc_code; | 392 | const char *loc_code; |
395 | char parm[MAX_LOC_CODE_LENGTH]; | 393 | char parm[MAX_LOC_CODE_LENGTH]; |
396 | 394 | ||
397 | if (count >= MAX_LOC_CODE_LENGTH) | 395 | if (count >= MAX_LOC_CODE_LENGTH) |
@@ -409,7 +407,7 @@ static ssize_t ibmebus_store_probe(struct bus_type *bus, | |||
409 | } | 407 | } |
410 | 408 | ||
411 | while ((dn = of_find_all_nodes(dn))) { | 409 | while ((dn = of_find_all_nodes(dn))) { |
412 | loc_code = (char *)get_property(dn, "ibm,loc-code", NULL); | 410 | loc_code = of_get_property(dn, "ibm,loc-code", NULL); |
413 | if (loc_code && (strncmp(loc_code, parm, count) == 0)) { | 411 | if (loc_code && (strncmp(loc_code, parm, count) == 0)) { |
414 | dev = ibmebus_register_device_node(dn); | 412 | dev = ibmebus_register_device_node(dn); |
415 | if (IS_ERR(dev)) { | 413 | if (IS_ERR(dev)) { |