summaryrefslogtreecommitdiffstats
path: root/sound/oss
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2006-07-12 15:41:18 +1000
committerPaul Mackerras <paulus@samba.org>2006-07-31 15:55:06 +1000
commitabddd185a0195988b8a5e802d55aff91783489de (patch)
treeb155a1d9aef8c34fafbf54ab7ed829726522913e /sound/oss
parent1a2509c946bfd4d4a4c5a6e816082d3a7de45db8 (diff)
downloadlinux-abddd185a0195988b8a5e802d55aff91783489de.tar.gz
linux-abddd185a0195988b8a5e802d55aff91783489de.tar.bz2
linux-abddd185a0195988b8a5e802d55aff91783489de.zip
[POWERPC] sound: 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. powerpc-specific sound driver changes. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'sound/oss')
-rw-r--r--sound/oss/dmasound/dmasound_awacs.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sound/oss/dmasound/dmasound_awacs.c b/sound/oss/dmasound/dmasound_awacs.c
index 4359903f4376..9ae659f82430 100644
--- a/sound/oss/dmasound/dmasound_awacs.c
+++ b/sound/oss/dmasound/dmasound_awacs.c
@@ -347,8 +347,8 @@ int
setup_audio_gpio(const char *name, const char* compatible, int *gpio_addr, int* gpio_pol)
{
struct device_node *np;
- u32* pp;
-
+ const u32* pp;
+
np = find_devices("gpio");
if (!np)
return -ENODEV;
@@ -356,7 +356,8 @@ setup_audio_gpio(const char *name, const char* compatible, int *gpio_addr, int*
np = np->child;
while(np != 0) {
if (name) {
- char *property = get_property(np,"audio-gpio",NULL);
+ const char *property =
+ get_property(np,"audio-gpio",NULL);
if (property != 0 && strcmp(property,name) == 0)
break;
} else if (compatible && device_is_compatible(np, compatible))
@@ -365,11 +366,11 @@ setup_audio_gpio(const char *name, const char* compatible, int *gpio_addr, int*
}
if (!np)
return -ENODEV;
- pp = (u32 *)get_property(np, "AAPL,address", NULL);
+ pp = get_property(np, "AAPL,address", NULL);
if (!pp)
return -ENODEV;
*gpio_addr = (*pp) & 0x0000ffff;
- pp = (u32 *)get_property(np, "audio-gpio-active-state", NULL);
+ pp = get_property(np, "audio-gpio-active-state", NULL);
if (pp)
*gpio_pol = *pp;
else