aboutsummaryrefslogtreecommitdiffstats
path: root/sound/ppc
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2007-04-03 08:39:14 -0400
committerPaul Mackerras <paulus@samba.org>2007-04-12 13:55:19 -0400
commitc4f55b394505fff6ad831d17e36e02dde1c3a8d7 (patch)
treecb7b24d1b0cd1cd2df4361105c33657af2bf7a97 /sound/ppc
parente2eb63927bfcb54232163bfec32440246fd44457 (diff)
[POWERPC] Rename get_property to of_get_property: sound
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'sound/ppc')
-rw-r--r--sound/ppc/pmac.c14
-rw-r--r--sound/ppc/tumbler.c20
2 files changed, 17 insertions, 17 deletions
diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c
index c64af55865d4..5e829683d1ad 100644
--- a/sound/ppc/pmac.c
+++ b/sound/ppc/pmac.c
@@ -864,7 +864,8 @@ static void __init detect_byte_swap(struct snd_pmac *chip)
864static int __init snd_pmac_detect(struct snd_pmac *chip) 864static int __init snd_pmac_detect(struct snd_pmac *chip)
865{ 865{
866 struct device_node *sound = NULL; 866 struct device_node *sound = NULL;
867 unsigned int *prop, l; 867 const unsigned int *prop;
868 unsigned int l;
868 struct macio_chip* macio; 869 struct macio_chip* macio;
869 870
870 if (!machine_is(powermac)) 871 if (!machine_is(powermac))
@@ -923,10 +924,10 @@ static int __init snd_pmac_detect(struct snd_pmac *chip)
923 } 924 }
924 if (! sound) 925 if (! sound)
925 return -ENODEV; 926 return -ENODEV;
926 prop = (unsigned int *) get_property(sound, "sub-frame", NULL); 927 prop = of_get_property(sound, "sub-frame", NULL);
927 if (prop && *prop < 16) 928 if (prop && *prop < 16)
928 chip->subframe = *prop; 929 chip->subframe = *prop;
929 prop = (unsigned int *) get_property(sound, "layout-id", NULL); 930 prop = of_get_property(sound, "layout-id", NULL);
930 if (prop) { 931 if (prop) {
931 /* partly deprecate snd-powermac, for those machines 932 /* partly deprecate snd-powermac, for those machines
932 * that have a layout-id property for now */ 933 * that have a layout-id property for now */
@@ -967,7 +968,7 @@ static int __init snd_pmac_detect(struct snd_pmac *chip)
967 chip->freq_table = tumbler_freqs; 968 chip->freq_table = tumbler_freqs;
968 chip->control_mask = MASK_IEPC | 0x11; /* disable IEE */ 969 chip->control_mask = MASK_IEPC | 0x11; /* disable IEE */
969 } 970 }
970 prop = (unsigned int *)get_property(sound, "device-id", NULL); 971 prop = of_get_property(sound, "device-id", NULL);
971 if (prop) 972 if (prop)
972 chip->device_id = *prop; 973 chip->device_id = *prop;
973 chip->has_iic = (find_devices("perch") != NULL); 974 chip->has_iic = (find_devices("perch") != NULL);
@@ -997,10 +998,9 @@ static int __init snd_pmac_detect(struct snd_pmac *chip)
997 998
998 /* look for a property saying what sample rates 999 /* look for a property saying what sample rates
999 are available */ 1000 are available */
1000 prop = (unsigned int *) get_property(sound, "sample-rates", &l); 1001 prop = of_get_property(sound, "sample-rates", &l);
1001 if (! prop) 1002 if (! prop)
1002 prop = (unsigned int *) get_property(sound, 1003 prop = of_get_property(sound, "output-frame-rates", &l);
1003 "output-frame-rates", &l);
1004 if (prop) { 1004 if (prop) {
1005 int i; 1005 int i;
1006 chip->freqs_ok = 0; 1006 chip->freqs_ok = 0;
diff --git a/sound/ppc/tumbler.c b/sound/ppc/tumbler.c
index 8f074c7936e6..8e01b558131d 100644
--- a/sound/ppc/tumbler.c
+++ b/sound/ppc/tumbler.c
@@ -1037,7 +1037,7 @@ static struct device_node *find_audio_device(const char *name)
1037 return NULL; 1037 return NULL;
1038 1038
1039 for (np = np->child; np; np = np->sibling) { 1039 for (np = np->child; np; np = np->sibling) {
1040 const char *property = get_property(np, "audio-gpio", NULL); 1040 const char *property = of_get_property(np, "audio-gpio", NULL);
1041 if (property && strcmp(property, name) == 0) 1041 if (property && strcmp(property, name) == 0)
1042 return np; 1042 return np;
1043 } 1043 }
@@ -1077,9 +1077,9 @@ static long tumbler_find_device(const char *device, const char *platform,
1077 return -ENODEV; 1077 return -ENODEV;
1078 } 1078 }
1079 1079
1080 base = get_property(node, "AAPL,address", NULL); 1080 base = of_get_property(node, "AAPL,address", NULL);
1081 if (! base) { 1081 if (! base) {
1082 base = get_property(node, "reg", NULL); 1082 base = of_get_property(node, "reg", NULL);
1083 if (!base) { 1083 if (!base) {
1084 DBG("(E) cannot find address for device %s !\n", device); 1084 DBG("(E) cannot find address for device %s !\n", device);
1085 snd_printd("cannot find address for device %s\n", device); 1085 snd_printd("cannot find address for device %s\n", device);
@@ -1093,7 +1093,7 @@ static long tumbler_find_device(const char *device, const char *platform,
1093 1093
1094 gp->addr = addr & 0x0000ffff; 1094 gp->addr = addr & 0x0000ffff;
1095 /* Try to find the active state, default to 0 ! */ 1095 /* Try to find the active state, default to 0 ! */
1096 base = get_property(node, "audio-gpio-active-state", NULL); 1096 base = of_get_property(node, "audio-gpio-active-state", NULL);
1097 if (base) { 1097 if (base) {
1098 gp->active_state = *base; 1098 gp->active_state = *base;
1099 gp->active_val = (*base) ? 0x5 : 0x4; 1099 gp->active_val = (*base) ? 0x5 : 0x4;
@@ -1108,7 +1108,7 @@ static long tumbler_find_device(const char *device, const char *platform,
1108 * as we don't yet have an interpreter for these things 1108 * as we don't yet have an interpreter for these things
1109 */ 1109 */
1110 if (platform) 1110 if (platform)
1111 prop = get_property(node, platform, NULL); 1111 prop = of_get_property(node, platform, NULL);
1112 if (prop) { 1112 if (prop) {
1113 if (prop[3] == 0x9 && prop[4] == 0x9) { 1113 if (prop[3] == 0x9 && prop[4] == 0x9) {
1114 gp->active_val = 0xd; 1114 gp->active_val = 0xd;
@@ -1310,7 +1310,7 @@ int __init snd_pmac_tumbler_init(struct snd_pmac *chip)
1310{ 1310{
1311 int i, err; 1311 int i, err;
1312 struct pmac_tumbler *mix; 1312 struct pmac_tumbler *mix;
1313 u32 *paddr; 1313 const u32 *paddr;
1314 struct device_node *tas_node, *np; 1314 struct device_node *tas_node, *np;
1315 char *chipname; 1315 char *chipname;
1316 1316
@@ -1331,9 +1331,9 @@ int __init snd_pmac_tumbler_init(struct snd_pmac *chip)
1331 1331
1332 for (np = chip->node->child; np; np = np->sibling) { 1332 for (np = chip->node->child; np; np = np->sibling) {
1333 if (!strcmp(np->name, "sound")) { 1333 if (!strcmp(np->name, "sound")) {
1334 if (get_property(np, "has-anded-reset", NULL)) 1334 if (of_get_property(np, "has-anded-reset", NULL))
1335 mix->anded_reset = 1; 1335 mix->anded_reset = 1;
1336 if (get_property(np, "layout-id", NULL)) 1336 if (of_get_property(np, "layout-id", NULL))
1337 mix->reset_on_sleep = 0; 1337 mix->reset_on_sleep = 0;
1338 break; 1338 break;
1339 } 1339 }
@@ -1348,9 +1348,9 @@ int __init snd_pmac_tumbler_init(struct snd_pmac *chip)
1348 if (tas_node == NULL) 1348 if (tas_node == NULL)
1349 return -ENODEV; 1349 return -ENODEV;
1350 1350
1351 paddr = (u32 *)get_property(tas_node, "i2c-address", NULL); 1351 paddr = of_get_property(tas_node, "i2c-address", NULL);
1352 if (paddr == NULL) 1352 if (paddr == NULL)
1353 paddr = (u32 *)get_property(tas_node, "reg", NULL); 1353 paddr = of_get_property(tas_node, "reg", NULL);
1354 if (paddr) 1354 if (paddr)
1355 mix->i2c.addr = (*paddr) >> 1; 1355 mix->i2c.addr = (*paddr) >> 1;
1356 else 1356 else