aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/aoa/core/snd-aoa-gpio-feature.c2
-rw-r--r--sound/oss/dmasound/dmasound_awacs.c11
-rw-r--r--sound/ppc/tumbler.c15
3 files changed, 15 insertions, 13 deletions
diff --git a/sound/aoa/core/snd-aoa-gpio-feature.c b/sound/aoa/core/snd-aoa-gpio-feature.c
index 7ae0c0bdfad8..2ab55330b31c 100644
--- a/sound/aoa/core/snd-aoa-gpio-feature.c
+++ b/sound/aoa/core/snd-aoa-gpio-feature.c
@@ -56,7 +56,7 @@ static struct device_node *get_gpio(char *name,
56{ 56{
57 struct device_node *np, *gpio; 57 struct device_node *np, *gpio;
58 u32 *reg; 58 u32 *reg;
59 char *audio_gpio; 59 const char *audio_gpio;
60 60
61 *gpioptr = -1; 61 *gpioptr = -1;
62 62
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
347setup_audio_gpio(const char *name, const char* compatible, int *gpio_addr, int* gpio_pol) 347setup_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
diff --git a/sound/ppc/tumbler.c b/sound/ppc/tumbler.c
index 692c61177678..b94ecd0ebab2 100644
--- a/sound/ppc/tumbler.c
+++ b/sound/ppc/tumbler.c
@@ -1035,7 +1035,7 @@ static struct device_node *find_audio_device(const char *name)
1035 return NULL; 1035 return NULL;
1036 1036
1037 for (np = np->child; np; np = np->sibling) { 1037 for (np = np->child; np; np = np->sibling) {
1038 char *property = get_property(np, "audio-gpio", NULL); 1038 const char *property = get_property(np, "audio-gpio", NULL);
1039 if (property && strcmp(property, name) == 0) 1039 if (property && strcmp(property, name) == 0)
1040 return np; 1040 return np;
1041 } 1041 }
@@ -1062,7 +1062,8 @@ static long tumbler_find_device(const char *device, const char *platform,
1062 struct pmac_gpio *gp, int is_compatible) 1062 struct pmac_gpio *gp, int is_compatible)
1063{ 1063{
1064 struct device_node *node; 1064 struct device_node *node;
1065 u32 *base, addr; 1065 const u32 *base;
1066 u32 addr;
1066 1067
1067 if (is_compatible) 1068 if (is_compatible)
1068 node = find_compatible_audio_device(device); 1069 node = find_compatible_audio_device(device);
@@ -1074,9 +1075,9 @@ static long tumbler_find_device(const char *device, const char *platform,
1074 return -ENODEV; 1075 return -ENODEV;
1075 } 1076 }
1076 1077
1077 base = (u32 *)get_property(node, "AAPL,address", NULL); 1078 base = get_property(node, "AAPL,address", NULL);
1078 if (! base) { 1079 if (! base) {
1079 base = (u32 *)get_property(node, "reg", NULL); 1080 base = get_property(node, "reg", NULL);
1080 if (!base) { 1081 if (!base) {
1081 DBG("(E) cannot find address for device %s !\n", device); 1082 DBG("(E) cannot find address for device %s !\n", device);
1082 snd_printd("cannot find address for device %s\n", device); 1083 snd_printd("cannot find address for device %s\n", device);
@@ -1090,13 +1091,13 @@ static long tumbler_find_device(const char *device, const char *platform,
1090 1091
1091 gp->addr = addr & 0x0000ffff; 1092 gp->addr = addr & 0x0000ffff;
1092 /* Try to find the active state, default to 0 ! */ 1093 /* Try to find the active state, default to 0 ! */
1093 base = (u32 *)get_property(node, "audio-gpio-active-state", NULL); 1094 base = get_property(node, "audio-gpio-active-state", NULL);
1094 if (base) { 1095 if (base) {
1095 gp->active_state = *base; 1096 gp->active_state = *base;
1096 gp->active_val = (*base) ? 0x5 : 0x4; 1097 gp->active_val = (*base) ? 0x5 : 0x4;
1097 gp->inactive_val = (*base) ? 0x4 : 0x5; 1098 gp->inactive_val = (*base) ? 0x4 : 0x5;
1098 } else { 1099 } else {
1099 u32 *prop = NULL; 1100 const u32 *prop = NULL;
1100 gp->active_state = 0; 1101 gp->active_state = 0;
1101 gp->active_val = 0x4; 1102 gp->active_val = 0x4;
1102 gp->inactive_val = 0x5; 1103 gp->inactive_val = 0x5;
@@ -1105,7 +1106,7 @@ static long tumbler_find_device(const char *device, const char *platform,
1105 * as we don't yet have an interpreter for these things 1106 * as we don't yet have an interpreter for these things
1106 */ 1107 */
1107 if (platform) 1108 if (platform)
1108 prop = (u32 *)get_property(node, platform, NULL); 1109 prop = get_property(node, platform, NULL);
1109 if (prop) { 1110 if (prop) {
1110 if (prop[3] == 0x9 && prop[4] == 0x9) { 1111 if (prop[3] == 0x9 && prop[4] == 0x9) {
1111 gp->active_val = 0xd; 1112 gp->active_val = 0xd;