diff options
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 |