]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - sound/oss/dmasound/dmasound_awacs.c
[POWERPC] Rename get_property to of_get_property: sound
[mirror_ubuntu-hirsute-kernel.git] / sound / oss / dmasound / dmasound_awacs.c
index 4359903f43762291509212ed097c3b6d7661dc17..977b91cea603f8b6070ae6be2867c04bea9e404c 100644 (file)
@@ -257,7 +257,7 @@ static volatile struct dbdma_cmd *emergency_dbdma_cmd;
 /*
  * Stuff for restoring after a sleep.
  */
-static int awacs_sleep_notify(struct pmu_sleep_notifier *self, int when);
+static void awacs_sleep_notify(struct pmu_sleep_notifier *self, int when);
 struct pmu_sleep_notifier awacs_sleep_notifier = {
        awacs_sleep_notify, SLEEP_LEVEL_SOUND,
 };
@@ -281,9 +281,9 @@ static int PMacSetFormat(int format);
 static int PMacSetVolume(int volume);
 static void PMacPlay(void);
 static void PMacRecord(void);
-static irqreturn_t pmac_awacs_tx_intr(int irq, void *devid, struct pt_regs *regs);
-static irqreturn_t pmac_awacs_rx_intr(int irq, void *devid, struct pt_regs *regs);
-static irqreturn_t pmac_awacs_intr(int irq, void *devid, struct pt_regs *regs);
+static irqreturn_t pmac_awacs_tx_intr(int irq, void *devid);
+static irqreturn_t pmac_awacs_rx_intr(int irq, void *devid);
+static irqreturn_t pmac_awacs_intr(int irq, void *devid);
 static void awacs_write(int val);
 static int awacs_get_volume(int reg, int lshift);
 static int awacs_volume_setter(int volume, int n, int mute, int lshift);
@@ -347,8 +347,8 @@ int
 setup_audio_gpio(const char *name, const char* compatible, int *gpio_addr, int* gpio_pol)
 {
        struct device_node *np;
-       u32* pp;
-       
+       const u32* pp;
+
        np = find_devices("gpio");
        if (!np)
                return -ENODEV;
@@ -356,7 +356,8 @@ setup_audio_gpio(const char *name, const char* compatible, int *gpio_addr, int*
        np = np->child;
        while(np != 0) {
                if (name) {
-                       char *property = get_property(np,"audio-gpio",NULL);
+                       const char *property =
+                               of_get_property(np,"audio-gpio",NULL);
                        if (property != 0 && strcmp(property,name) == 0)
                                break;
                } 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*
        }
        if (!np)
                return -ENODEV;
-       pp = (u32 *)get_property(np, "AAPL,address", NULL);
+       pp = of_get_property(np, "AAPL,address", NULL);
        if (!pp)
                return -ENODEV;
        *gpio_addr = (*pp) & 0x0000ffff;
-       pp = (u32 *)get_property(np, "audio-gpio-active-state", NULL);
+       pp = of_get_property(np, "audio-gpio-active-state", NULL);
        if (pp)
                *gpio_pol = *pp;
        else
@@ -397,7 +398,7 @@ read_audio_gpio(int gpio_addr)
  * Headphone interrupt via GPIO (Tumbler, Snapper, DACA)
  */
 static irqreturn_t
-headphone_intr(int irq, void *devid, struct pt_regs *regs)
+headphone_intr(int irq, void *devid)
 {
        unsigned long flags;
 
@@ -464,7 +465,7 @@ tas_dmasound_init(void)
                        val = pmac_call_feature(PMAC_FTR_READ_GPIO, NULL, gpio_headphone_detect, 0);
                        pmac_call_feature(PMAC_FTR_WRITE_GPIO, NULL, gpio_headphone_detect, val | 0x80);
                        /* Trigger it */
-                       headphone_intr(0,NULL,NULL);
+                       headphone_intr(0, NULL);
                }
        }
        if (!gpio_headphone_irq) {
@@ -577,7 +578,7 @@ tas_mixer_ioctl(u_int cmd, u_long arg)
 }
 
 static void __init
-tas_init_frame_rates(unsigned int *prop, unsigned int l)
+tas_init_frame_rates(const unsigned int *prop, unsigned int l)
 {
        int i ;
        if (prop) {
@@ -1036,7 +1037,7 @@ static void PMacRecord(void)
 */
 
 static irqreturn_t
-pmac_awacs_tx_intr(int irq, void *devid, struct pt_regs *regs)
+pmac_awacs_tx_intr(int irq, void *devid)
 {
        int i = write_sq.front;
        int stat;
@@ -1128,7 +1129,7 @@ printk("dmasound_pmac: tx-irq: xfer died - patching it up...\n") ;
 
 
 static irqreturn_t
-pmac_awacs_rx_intr(int irq, void *devid, struct pt_regs *regs)
+pmac_awacs_rx_intr(int irq, void *devid)
 {
        int stat ;
        /* For some reason on my PowerBook G3, I get one interrupt
@@ -1211,7 +1212,7 @@ printk("dmasound_pmac: rx-irq: DIED - attempting resurection\n");
 
 
 static irqreturn_t
-pmac_awacs_intr(int irq, void *devid, struct pt_regs *regs)
+pmac_awacs_intr(int irq, void *devid)
 {
        int ctrl;
        int status;
@@ -1418,7 +1419,7 @@ load_awacs(void)
  * Save state when going to sleep, restore it afterwards.
  */
 /* FIXME: sort out disabling/re-enabling of read stuff as well */
-static int awacs_sleep_notify(struct pmu_sleep_notifier *self, int when)
+static void awacs_sleep_notify(struct pmu_sleep_notifier *self, int when)
 {
        unsigned long flags;
 
@@ -1498,7 +1499,7 @@ static int awacs_sleep_notify(struct pmu_sleep_notifier *self, int when)
                                write_audio_gpio(gpio_audio_reset, !gpio_audio_reset_pol);
                                msleep(150);
                                tas_leave_sleep(); /* Stub for now */
-                               headphone_intr(0,NULL,NULL);
+                               headphone_intr(0, NULL);
                                break;
                        case AWACS_DACA:
                                msleep(10); /* Check this !!! */
@@ -1547,7 +1548,6 @@ static int awacs_sleep_notify(struct pmu_sleep_notifier *self, int when)
                spin_unlock_irqrestore(&dmasound.lock, flags);
                UNLOCK();
        }
-       return PBOOK_SLEEP_OK;
 }
 #endif /* CONFIG_PM */
 
@@ -2651,7 +2651,7 @@ get_expansion_type(void)
 */
 
 static void __init
-awacs_init_frame_rates(unsigned int *prop, unsigned int l)
+awacs_init_frame_rates(const unsigned int *prop, unsigned int l)
 {
        int i ;
        if (prop) {
@@ -2674,7 +2674,7 @@ awacs_init_frame_rates(unsigned int *prop, unsigned int l)
 }
 
 static void __init
-burgundy_init_frame_rates(unsigned int *prop, unsigned int l)
+burgundy_init_frame_rates(const unsigned int *prop, unsigned int l)
 {
        int temp[9] ;
        int i = 0 ;
@@ -2700,7 +2700,7 @@ if (i > 1){
 }
 
 static void __init
-daca_init_frame_rates(unsigned int *prop, unsigned int l)
+daca_init_frame_rates(const unsigned int *prop, unsigned int l)
 {
        int temp[9] ;
        int i = 0 ;
@@ -2727,7 +2727,7 @@ if (i > 1){
 }
 
 static void __init
-init_frame_rates(unsigned int *prop, unsigned int l)
+init_frame_rates(const unsigned int *prop, unsigned int l)
 {
        switch (awacs_revision) {
                case AWACS_TUMBLER:
@@ -2972,21 +2972,21 @@ printk("dmasound_pmac: Awacs/Screamer Codec Mfct: %d Rev %d\n", mfg, rev);
        */
 
        if (info) {
-               unsigned int *prop, l;
+               const unsigned int *prop;
+               unsigned int l;
 
                sound_device_id = 0;
                /* device ID appears post g3 b&w */
-               prop = (unsigned int *)get_property(info, "device-id", NULL);
+               prop = of_get_property(info, "device-id", NULL);
                if (prop != 0)
                        sound_device_id = *prop;
 
                /* look for a property saying what sample rates
                   are available */
 
-               prop = (unsigned int *)get_property(info, "sample-rates", &l);
+               prop = of_get_property(info, "sample-rates", &l);
                if (prop == 0)
-                       prop = (unsigned int *) get_property
-                               (info, "output-frame-rates", &l);
+                       prop = of_get_property(info, "output-frame-rates", &l);
 
                /* if it's there use it to set up frame rates */
                init_frame_rates(prop, l) ;