aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/macio_sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/macintosh/macio_sysfs.c')
-rw-r--r--drivers/macintosh/macio_sysfs.c8
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
16compatible_show (struct device *dev, struct device_attribute *attr, char *buf) 16compatible_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;