From a7edd0e676d51145ae634a2acf7a447e319200fa Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Tue, 3 Apr 2007 10:52:17 +1000 Subject: [POWERPC] get_property returns const This just tidies up some of the remains. Signed-off-by: Stephen Rothwell Signed-off-by: Paul Mackerras --- sound/aoa/soundbus/core.c | 9 ++++----- sound/aoa/soundbus/i2sbus/i2sbus-core.c | 7 +++---- 2 files changed, 7 insertions(+), 9 deletions(-) (limited to 'sound/aoa/soundbus') diff --git a/sound/aoa/soundbus/core.c b/sound/aoa/soundbus/core.c index 47b3e3768df0..45680b5ebc35 100644 --- a/sound/aoa/soundbus/core.c +++ b/sound/aoa/soundbus/core.c @@ -61,9 +61,10 @@ static int soundbus_uevent(struct device *dev, char **envp, int num_envp, { struct soundbus_dev * soundbus_dev; struct of_device * of; - char *scratch, *compat, *compat2; + char *scratch; + const char *compat; int i = 0; - int length, cplen, cplen2, seen = 0; + int length, cplen, seen = 0; if (!dev) return -ENODEV; @@ -95,9 +96,7 @@ static int soundbus_uevent(struct device *dev, char **envp, int num_envp, * it's not really legal to split it out with commas. We split it * up using a number of environment variables instead. */ - compat = (char *) get_property(of->node, "compatible", &cplen); - compat2 = compat; - cplen2= cplen; + compat = get_property(of->node, "compatible", &cplen); while (compat && cplen > 0) { envp[i++] = scratch; length = scnprintf (scratch, buffer_size, diff --git a/sound/aoa/soundbus/i2sbus/i2sbus-core.c b/sound/aoa/soundbus/i2sbus/i2sbus-core.c index e36f6aa448d4..bbe50a0fa115 100644 --- a/sound/aoa/soundbus/i2sbus/i2sbus-core.c +++ b/sound/aoa/soundbus/i2sbus/i2sbus-core.c @@ -122,7 +122,7 @@ static int i2sbus_get_and_fixup_rsrc(struct device_node *np, int index, { struct device_node *parent; int pindex, rc = -ENXIO; - u32 *reg; + const u32 *reg; /* Machines with layout 76 and 36 (K2 based) have a weird device * tree what we need to special case. @@ -141,7 +141,7 @@ static int i2sbus_get_and_fixup_rsrc(struct device_node *np, int index, rc = of_address_to_resource(parent, pindex, res); if (rc) goto bail; - reg = (u32 *)get_property(np, "reg", NULL); + reg = get_property(np, "reg", NULL); if (reg == NULL) { rc = -ENXIO; goto bail; @@ -188,8 +188,7 @@ static int i2sbus_add_dev(struct macio_dev *macio, } } if (i == 1) { - u32 *layout_id; - layout_id = (u32*) get_property(sound, "layout-id", NULL); + const u32 *layout_id = get_property(sound, "layout-id", NULL); if (layout_id) { layout = *layout_id; snprintf(dev->sound.modalias, 32, -- cgit v1.2.2