diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2006-07-12 01:41:18 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-07-31 01:55:06 -0400 |
commit | abddd185a0195988b8a5e802d55aff91783489de (patch) | |
tree | b155a1d9aef8c34fafbf54ab7ed829726522913e /sound/oss | |
parent | 1a2509c946bfd4d4a4c5a6e816082d3a7de45db8 (diff) |
[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.c | 11 |
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 | |||
347 | setup_audio_gpio(const char *name, const char* compatible, int *gpio_addr, int* gpio_pol) | 347 | setup_audio_gpio(const char *name, const char* compatible, int *gpio_addr, int* gpio_pol) |
348 | { | 348 | { |
349 | struct device_node *np; | 349 | struct device_node *np; |
350 | u32* pp; | 350 | const u32* pp; |
351 | 351 | ||
352 | np = find_devices("gpio"); | 352 | np = find_devices("gpio"); |
353 | if (!np) | 353 | if (!np) |
354 | return -ENODEV; | 354 | return -ENODEV; |
@@ -356,7 +356,8 @@ setup_audio_gpio(const char *name, const char* compatible, int *gpio_addr, int* | |||
356 | np = np->child; | 356 | np = np->child; |
357 | while(np != 0) { | 357 | while(np != 0) { |
358 | if (name) { | 358 | if (name) { |
359 | char *property = get_property(np,"audio-gpio",NULL); | 359 | const char *property = |
360 | get_property(np,"audio-gpio",NULL); | ||
360 | if (property != 0 && strcmp(property,name) == 0) | 361 | if (property != 0 && strcmp(property,name) == 0) |
361 | break; | 362 | break; |
362 | } else if (compatible && device_is_compatible(np, compatible)) | 363 | } 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* | |||
365 | } | 366 | } |
366 | if (!np) | 367 | if (!np) |
367 | return -ENODEV; | 368 | return -ENODEV; |
368 | pp = (u32 *)get_property(np, "AAPL,address", NULL); | 369 | pp = get_property(np, "AAPL,address", NULL); |
369 | if (!pp) | 370 | if (!pp) |
370 | return -ENODEV; | 371 | return -ENODEV; |
371 | *gpio_addr = (*pp) & 0x0000ffff; | 372 | *gpio_addr = (*pp) & 0x0000ffff; |
372 | pp = (u32 *)get_property(np, "audio-gpio-active-state", NULL); | 373 | pp = get_property(np, "audio-gpio-active-state", NULL); |
373 | if (pp) | 374 | if (pp) |
374 | *gpio_pol = *pp; | 375 | *gpio_pol = *pp; |
375 | else | 376 | else |