diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2006-07-12 01:40:29 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-07-31 01:55:05 -0400 |
commit | 018a3d1db7cdb6127656c1622ee1d2302e16436d (patch) | |
tree | 5b6714fa9fcd1441f7c1b30e0391484c095925b6 /drivers/macintosh/macio_sysfs.c | |
parent | eeb2b723ef5100fafa381d92eb70d83e98516a44 (diff) |
[POWERPC] powermac: Constify & voidify get_property()
Now that get_property() returns a void *, there's no need to cast its
return value. Also, treat the return value as const, so we can
constify get_property later.
powermac platform & macintosh driver changes.
Built for pmac32_defconfig, g5_defconfig
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers/macintosh/macio_sysfs.c')
-rw-r--r-- | drivers/macintosh/macio_sysfs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/macintosh/macio_sysfs.c b/drivers/macintosh/macio_sysfs.c index cae24a13526a..8566bdfdd4b8 100644 --- a/drivers/macintosh/macio_sysfs.c +++ b/drivers/macintosh/macio_sysfs.c | |||
@@ -16,12 +16,12 @@ static ssize_t | |||
16 | compatible_show (struct device *dev, struct device_attribute *attr, char *buf) | 16 | compatible_show (struct device *dev, struct device_attribute *attr, char *buf) |
17 | { | 17 | { |
18 | struct of_device *of; | 18 | struct of_device *of; |
19 | char *compat; | 19 | const char *compat; |
20 | int cplen; | 20 | int cplen; |
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 = (char *) get_property(of->node, "compatible", &cplen); | 24 | compat = get_property(of->node, "compatible", &cplen); |
25 | if (!compat) { | 25 | if (!compat) { |
26 | *buf = '\0'; | 26 | *buf = '\0'; |
27 | return 0; | 27 | return 0; |
@@ -42,12 +42,12 @@ static ssize_t modalias_show (struct device *dev, struct device_attribute *attr, | |||
42 | char *buf) | 42 | char *buf) |
43 | { | 43 | { |
44 | struct of_device *of; | 44 | struct of_device *of; |
45 | char *compat; | 45 | const char *compat; |
46 | int cplen; | 46 | int cplen; |
47 | int length; | 47 | int length; |
48 | 48 | ||
49 | of = &to_macio_device (dev)->ofdev; | 49 | of = &to_macio_device (dev)->ofdev; |
50 | compat = (char *) get_property (of->node, "compatible", &cplen); | 50 | compat = 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; |