[POWERPC] Rename get_property to of_get_property: sound
[safe/jmp/linux-2.6] / sound / ppc / tumbler.c
index 2fbe1d1..8e01b55 100644 (file)
@@ -942,10 +942,11 @@ static void check_mute(struct snd_pmac *chip, struct pmac_gpio *gp, int val, int
 }
 
 static struct work_struct device_change;
+static struct snd_pmac *device_change_chip;
 
-static void device_change_handler(void *self)
+static void device_change_handler(struct work_struct *work)
 {
-       struct snd_pmac *chip = self;
+       struct snd_pmac *chip = device_change_chip;
        struct pmac_tumbler *mix;
        int headphone, lineout;
 
@@ -1036,7 +1037,7 @@ static struct device_node *find_audio_device(const char *name)
                return NULL;
   
        for (np = np->child; np; np = np->sibling) {
-               const char *property = get_property(np, "audio-gpio", NULL);
+               const char *property = of_get_property(np, "audio-gpio", NULL);
                if (property && strcmp(property, name) == 0)
                        return np;
        }  
@@ -1076,9 +1077,9 @@ static long tumbler_find_device(const char *device, const char *platform,
                return -ENODEV;
        }
 
-       base = get_property(node, "AAPL,address", NULL);
+       base = of_get_property(node, "AAPL,address", NULL);
        if (! base) {
-               base = get_property(node, "reg", NULL);
+               base = of_get_property(node, "reg", NULL);
                if (!base) {
                        DBG("(E) cannot find address for device %s !\n", device);
                        snd_printd("cannot find address for device %s\n", device);
@@ -1092,7 +1093,7 @@ static long tumbler_find_device(const char *device, const char *platform,
 
        gp->addr = addr & 0x0000ffff;
        /* Try to find the active state, default to 0 ! */
-       base = get_property(node, "audio-gpio-active-state", NULL);
+       base = of_get_property(node, "audio-gpio-active-state", NULL);
        if (base) {
                gp->active_state = *base;
                gp->active_val = (*base) ? 0x5 : 0x4;
@@ -1107,7 +1108,7 @@ static long tumbler_find_device(const char *device, const char *platform,
                 * as we don't yet have an interpreter for these things
                 */
                if (platform)
-                       prop = get_property(node, platform, NULL);
+                       prop = of_get_property(node, platform, NULL);
                if (prop) {
                        if (prop[3] == 0x9 && prop[4] == 0x9) {
                                gp->active_val = 0xd;
@@ -1309,7 +1310,7 @@ int __init snd_pmac_tumbler_init(struct snd_pmac *chip)
 {
        int i, err;
        struct pmac_tumbler *mix;
-       u32 *paddr;
+       const u32 *paddr;
        struct device_node *tas_node, *np;
        char *chipname;
 
@@ -1330,9 +1331,9 @@ int __init snd_pmac_tumbler_init(struct snd_pmac *chip)
 
        for (np = chip->node->child; np; np = np->sibling) {
                if (!strcmp(np->name, "sound")) {
-                       if (get_property(np, "has-anded-reset", NULL))
+                       if (of_get_property(np, "has-anded-reset", NULL))
                                mix->anded_reset = 1;
-                       if (get_property(np, "layout-id", NULL))
+                       if (of_get_property(np, "layout-id", NULL))
                                mix->reset_on_sleep = 0;
                        break;
                }
@@ -1347,9 +1348,9 @@ int __init snd_pmac_tumbler_init(struct snd_pmac *chip)
        if (tas_node == NULL)
                return -ENODEV;
 
-       paddr = (u32 *)get_property(tas_node, "i2c-address", NULL);
+       paddr = of_get_property(tas_node, "i2c-address", NULL);
        if (paddr == NULL)
-               paddr = (u32 *)get_property(tas_node, "reg", NULL);
+               paddr = of_get_property(tas_node, "reg", NULL);
        if (paddr)
                mix->i2c.addr = (*paddr) >> 1;
        else
@@ -1417,7 +1418,8 @@ int __init snd_pmac_tumbler_init(struct snd_pmac *chip)
        chip->resume = tumbler_resume;
 #endif
 
-       INIT_WORK(&device_change, device_change_handler, (void *)chip);
+       INIT_WORK(&device_change, device_change_handler);
+       device_change_chip = chip;
 
 #ifdef PMAC_SUPPORT_AUTOMUTE
        if ((mix->headphone_irq >=0 || mix->lineout_irq >= 0)