X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Foss%2Fdmasound%2Fdmasound_awacs.c;h=37773b1deea51e25e4d864fb405ab75528bca756;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=4359903f43762291509212ed097c3b6d7661dc17;hpb=16c70f8c1b54b61c3b951b6fb220df250fe09b32;p=linux-2.6.git diff --git a/sound/oss/dmasound/dmasound_awacs.c b/sound/oss/dmasound/dmasound_awacs.c index 4359903f4..37773b1de 100644 --- a/sound/oss/dmasound/dmasound_awacs.c +++ b/sound/oss/dmasound/dmasound_awacs.c @@ -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 = + 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 = 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 = 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) { @@ -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; @@ -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 !!! */