diff options
Diffstat (limited to 'sound/ppc/tumbler.c')
-rw-r--r-- | sound/ppc/tumbler.c | 15 |
1 files changed, 8 insertions, 7 deletions
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; |