From a62c80e559809e6c7851ec04d30575e85ad6f6ed Mon Sep 17 00:00:00 2001 From: Russell King Date: Sat, 7 Jan 2006 13:52:45 +0000 Subject: [ARM] Move AMBA include files to include/linux/amba/ Since the ARM AMBA bus is used on MIPS as well as ARM, we need to make the bus available for other architectures to use. Move the AMBA include files from include/asm-arm/hardware/ to include/linux/amba/ Signed-off-by: Russell King --- sound/arm/aaci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c index 559ead6367da..5b6cae50d0d5 100644 --- a/sound/arm/aaci.c +++ b/sound/arm/aaci.c @@ -17,11 +17,11 @@ #include #include #include +#include #include #include #include -#include #include #include -- cgit v1.2.2 From cc5d0189b9ba95260857a5018a1c2fef90008507 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Tue, 13 Dec 2005 18:01:21 +1100 Subject: [PATCH] powerpc: Remove device_node addrs/n_addr The pre-parsed addrs/n_addrs fields in struct device_node are finally gone. Remove the dodgy heuristics that did that parsing at boot and remove the fields themselves since we now have a good replacement with the new OF parsing code. This patch also fixes a bunch of drivers to use the new code instead, so that at least pmac32, pseries, iseries and g5 defconfigs build. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras --- sound/oss/dmasound/dmasound_awacs.c | 81 +++++++++++++++++------------ sound/ppc/pmac.c | 100 +++++++++++++++++++++++------------- sound/ppc/pmac.h | 3 +- 3 files changed, 114 insertions(+), 70 deletions(-) (limited to 'sound') diff --git a/sound/oss/dmasound/dmasound_awacs.c b/sound/oss/dmasound/dmasound_awacs.c index cebd881b91ae..74f975676ccb 100644 --- a/sound/oss/dmasound/dmasound_awacs.c +++ b/sound/oss/dmasound/dmasound_awacs.c @@ -125,6 +125,7 @@ static int awacs_rate_index; static int awacs_subframe; static struct device_node* awacs_node; static struct device_node* i2s_node; +static struct resource awacs_rsrc[3]; static char awacs_name[64]; static int awacs_revision; @@ -667,9 +668,12 @@ static void PMacIrqCleanup(void) iounmap(awacs_txdma); iounmap(awacs_rxdma); - release_OF_resource(awacs_node, 0); - release_OF_resource(awacs_node, 1); - release_OF_resource(awacs_node, 2); + release_mem_region(awacs_rsrc[0].start, + awacs_rsrc[0].end - awacs_rsrc[0].start + 1); + release_mem_region(awacs_rsrc[1].start, + awacs_rsrc[1].end - awacs_rsrc[1].start + 1); + release_mem_region(awacs_rsrc[2].start, + awacs_rsrc[2].end - awacs_rsrc[2].start + 1); kfree(awacs_tx_cmd_space); kfree(awacs_rx_cmd_space); @@ -2863,46 +2867,58 @@ printk("dmasound_pmac: couldn't find a Codec we can handle\n"); * other info if necessary (early AWACS we want to read chip ids) */ - if (io->n_addrs < 3 || io->n_intrs < 3) { + if (of_get_address(io, 2, NULL, NULL) == NULL || io->n_intrs < 3) { /* OK - maybe we need to use the 'awacs' node (on earlier * machines). - */ + */ if (awacs_node) { io = awacs_node ; - if (io->n_addrs < 3 || io->n_intrs < 3) { - printk("dmasound_pmac: can't use %s" - " (%d addrs, %d intrs)\n", - io->full_name, io->n_addrs, io->n_intrs); + if (of_get_address(io, 2, NULL, NULL) == NULL || + io->n_intrs < 3) { + printk("dmasound_pmac: can't use %s\n", + io->full_name); return -ENODEV; } - } else { - printk("dmasound_pmac: can't use %s (%d addrs, %d intrs)\n", - io->full_name, io->n_addrs, io->n_intrs); - } + } else + printk("dmasound_pmac: can't use %s\n", io->full_name); } - if (!request_OF_resource(io, 0, NULL)) { + if (of_address_to_resource(io, 0, &awacs_rsrc[0]) || + request_mem_region(awacs_rsrc[0].start, + awacs_rsrc[0].end - awacs_rsrc[0].start + 1, + " (IO)") == NULL) { printk(KERN_ERR "dmasound: can't request IO resource !\n"); return -ENODEV; } - if (!request_OF_resource(io, 1, " (tx dma)")) { - release_OF_resource(io, 0); - printk(KERN_ERR "dmasound: can't request TX DMA resource !\n"); + if (of_address_to_resource(io, 1, &awacs_rsrc[1]) || + request_mem_region(awacs_rsrc[1].start, + awacs_rsrc[1].end - awacs_rsrc[1].start + 1, + " (tx dma)") == NULL) { + release_mem_region(awacs_rsrc[0].start, + awacs_rsrc[0].end - awacs_rsrc[0].start + 1); + printk(KERN_ERR "dmasound: can't request Tx DMA resource !\n"); return -ENODEV; } - - if (!request_OF_resource(io, 2, " (rx dma)")) { - release_OF_resource(io, 0); - release_OF_resource(io, 1); - printk(KERN_ERR "dmasound: can't request RX DMA resource !\n"); + if (of_address_to_resource(io, 2, &awacs_rsrc[2]) || + request_mem_region(awacs_rsrc[2].start, + awacs_rsrc[2].end - awacs_rsrc[2].start + 1, + " (rx dma)") == NULL) { + release_mem_region(awacs_rsrc[0].start, + awacs_rsrc[0].end - awacs_rsrc[0].start + 1); + release_mem_region(awacs_rsrc[1].start, + awacs_rsrc[1].end - awacs_rsrc[1].start + 1); + printk(KERN_ERR "dmasound: can't request Rx DMA resource !\n"); return -ENODEV; } awacs_beep_dev = input_allocate_device(); if (!awacs_beep_dev) { - release_OF_resource(io, 0); - release_OF_resource(io, 1); - release_OF_resource(io, 2); + release_mem_region(awacs_rsrc[0].start, + awacs_rsrc[0].end - awacs_rsrc[0].start + 1); + release_mem_region(awacs_rsrc[1].start, + awacs_rsrc[1].end - awacs_rsrc[1].start + 1); + release_mem_region(awacs_rsrc[2].start, + awacs_rsrc[2].end - awacs_rsrc[2].start + 1); printk(KERN_ERR "dmasound: can't allocate input device !\n"); return -ENOMEM; } @@ -2916,11 +2932,11 @@ printk("dmasound_pmac: couldn't find a Codec we can handle\n"); /* all OF versions I've seen use this value */ if (i2s_node) - i2s = ioremap(io->addrs[0].address, 0x1000); + i2s = ioremap(awacs_rsrc[0].start, 0x1000); else - awacs = ioremap(io->addrs[0].address, 0x1000); - awacs_txdma = ioremap(io->addrs[1].address, 0x100); - awacs_rxdma = ioremap(io->addrs[2].address, 0x100); + awacs = ioremap(awacs_rsrc[0].start, 0x1000); + awacs_txdma = ioremap(awacs_rsrc[1].start, 0x100); + awacs_rxdma = ioremap(awacs_rsrc[2].start, 0x100); /* first of all make sure that the chip is powered up....*/ pmac_call_feature(PMAC_FTR_SOUND_CHIP_ENABLE, io, 0, 1); @@ -3083,9 +3099,10 @@ printk("dmasound_pmac: Awacs/Screamer Codec Mfct: %d Rev %d\n", mfg, rev); struct device_node* mio; macio_base = NULL; for (mio = io->parent; mio; mio = mio->parent) { - if (strcmp(mio->name, "mac-io") == 0 - && mio->n_addrs > 0) { - macio_base = ioremap(mio->addrs[0].address, 0x40); + if (strcmp(mio->name, "mac-io") == 0) { + struct resource r; + if (of_address_to_resource(mio, 0, &r) == 0) + macio_base = ioremap(r.start, 0x40); break; } } diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c index 9b2b00fdc1ae..a642e4cfcf45 100644 --- a/sound/ppc/pmac.c +++ b/sound/ppc/pmac.c @@ -803,21 +803,17 @@ static int snd_pmac_free(struct snd_pmac *chip) iounmap(chip->playback.dma); if (chip->capture.dma) iounmap(chip->capture.dma); -#ifndef CONFIG_PPC64 + if (chip->node) { int i; - for (i = 0; i < 3; i++) { - if (chip->of_requested & (1 << i)) { - if (chip->is_k2) - release_OF_resource(chip->node->parent, - i); - else - release_OF_resource(chip->node, i); - } + if (chip->requested & (1 << i)) + release_mem_region(chip->rsrc[i].start, + chip->rsrc[i].end - + chip->rsrc[i].start + 1); } } -#endif /* CONFIG_PPC64 */ + if (chip->pdev) pci_dev_put(chip->pdev); kfree(chip); @@ -991,6 +987,11 @@ static int __init snd_pmac_detect(struct snd_pmac *chip) chip->can_byte_swap = 0; /* FIXME: check this */ chip->control_mask = MASK_IEPC | 0x11;/* disable IEE */ break; + default: + printk(KERN_ERR "snd: Unknown layout ID 0x%x\n", + layout_id); + return -ENODEV; + } } prop = (unsigned int *)get_property(sound, "device-id", NULL); @@ -1175,46 +1176,69 @@ int __init snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return) } np = chip->node; + chip->requested = 0; if (chip->is_k2) { - if (np->parent->n_addrs < 2 || np->n_intrs < 3) { + static char *rnames[] = { + "Sound Control", "Sound DMA" }; + if (np->n_intrs < 3) { err = -ENODEV; goto __error; } - for (i = 0; i < 2; i++) { -#ifndef CONFIG_PPC64 - static char *name[2] = { "- Control", "- DMA" }; - if (! request_OF_resource(np->parent, i, name[i])) { - snd_printk(KERN_ERR "pmac: can't request resource %d!\n", i); + for (i = 0; i < 2; i ++) { + if (of_address_to_resource(np->parent, i, + &chip->rsrc[i])) { + printk(KERN_ERR "snd: can't translate rsrc " + " %d (%s)\n", i, rnames[i]); + err = -ENODEV; + goto __error; + } + if (request_mem_region(chip->rsrc[i].start, + chip->rsrc[i].end - + chip->rsrc[i].start + 1, + rnames[i]) == NULL) { + printk(KERN_ERR "snd: can't request rsrc " + " %d (%s: 0x%08lx:%08lx)\n", + i, rnames[i], chip->rsrc[i].start, + chip->rsrc[i].end); err = -ENODEV; goto __error; } - chip->of_requested |= (1 << i); -#endif /* CONFIG_PPC64 */ - ctrl_addr = np->parent->addrs[0].address; - txdma_addr = np->parent->addrs[1].address; - rxdma_addr = txdma_addr + 0x100; + chip->requested |= (1 << i); } - + ctrl_addr = chip->rsrc[0].start; + txdma_addr = chip->rsrc[1].start; + rxdma_addr = txdma_addr + 0x100; } else { - if (np->n_addrs < 3 || np->n_intrs < 3) { + static char *rnames[] = { + "Sound Control", "Sound Tx DMA", "Sound Rx DMA" }; + if (np->n_intrs < 3) { err = -ENODEV; goto __error; } - - for (i = 0; i < 3; i++) { -#ifndef CONFIG_PPC64 - static char *name[3] = { "- Control", "- Tx DMA", "- Rx DMA" }; - if (! request_OF_resource(np, i, name[i])) { - snd_printk(KERN_ERR "pmac: can't request resource %d!\n", i); + for (i = 0; i < 3; i ++) { + if (of_address_to_resource(np->parent, i, + &chip->rsrc[i])) { + printk(KERN_ERR "snd: can't translate rsrc " + " %d (%s)\n", i, rnames[i]); + err = -ENODEV; + goto __error; + } + if (request_mem_region(chip->rsrc[i].start, + chip->rsrc[i].end - + chip->rsrc[i].start + 1, + rnames[i]) == NULL) { + printk(KERN_ERR "snd: can't request rsrc " + " %d (%s: 0x%08lx:%08lx)\n", + i, rnames[i], chip->rsrc[i].start, + chip->rsrc[i].end); err = -ENODEV; goto __error; } - chip->of_requested |= (1 << i); -#endif /* CONFIG_PPC64 */ - ctrl_addr = np->addrs[0].address; - txdma_addr = np->addrs[1].address; - rxdma_addr = np->addrs[2].address; + chip->requested |= (1 << i); } + ctrl_addr = chip->rsrc[0].start; + txdma_addr = chip->rsrc[1].start; + rxdma_addr = chip->rsrc[2].start; } chip->awacs = ioremap(ctrl_addr, 0x1000); @@ -1266,9 +1290,11 @@ int __init snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return) } else if (chip->is_pbook_G3) { struct device_node* mio; for (mio = chip->node->parent; mio; mio = mio->parent) { - if (strcmp(mio->name, "mac-io") == 0 - && mio->n_addrs > 0) { - chip->macio_base = ioremap(mio->addrs[0].address, 0x40); + if (strcmp(mio->name, "mac-io") == 0) { + struct resource r; + if (of_address_to_resource(mio, 0, &r) == 0) + chip->macio_base = + ioremap(r.start, 0x40); break; } } diff --git a/sound/ppc/pmac.h b/sound/ppc/pmac.h index 086da7a18909..3a9bd4dbb9a6 100644 --- a/sound/ppc/pmac.h +++ b/sound/ppc/pmac.h @@ -113,7 +113,8 @@ struct snd_pmac { unsigned int initialized : 1; unsigned int feature_is_set : 1; - unsigned int of_requested; + unsigned int requested; + struct resource rsrc[3]; int num_freqs; int *freq_table; -- cgit v1.2.2 From a1365647022eb05a5993f270a78e9bef3bf554eb Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Sun, 8 Jan 2006 01:04:09 -0800 Subject: [PATCH] remove gcc-2 checks Remove various things which were checking for gcc-1.x and gcc-2.x compilers. From: Adrian Bunk Some documentation updates and removes some code paths for gcc < 3.2. Acked-by: Russell King Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- sound/isa/wavefront/wavefront_synth.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'sound') diff --git a/sound/isa/wavefront/wavefront_synth.c b/sound/isa/wavefront/wavefront_synth.c index 679d0ae97e4f..ed81eec6e732 100644 --- a/sound/isa/wavefront/wavefront_synth.c +++ b/sound/isa/wavefront/wavefront_synth.c @@ -115,18 +115,11 @@ MODULE_PARM_DESC(osrun_time, "how many seconds to wait for the ICS2115 OS"); #ifdef WF_DEBUG -#if defined(NEW_MACRO_VARARGS) || __GNUC__ >= 3 #define DPRINT(cond, ...) \ if ((dev->debug & (cond)) == (cond)) { \ snd_printk (__VA_ARGS__); \ } #else -#define DPRINT(cond, args...) \ - if ((dev->debug & (cond)) == (cond)) { \ - snd_printk (args); \ - } -#endif -#else #define DPRINT(cond, args...) #endif /* WF_DEBUG */ -- cgit v1.2.2 From 86f91d36c2aac910b7cf7e5d047019b10a9a627e Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Sun, 8 Jan 2006 01:05:14 -0800 Subject: [PATCH] i810_audio: request_irq() fix Request the IRQ after having set everything up. Otherwise a shared interrupt at the right time can kill the machine. Found this with David Woodhouse 's debug-shared-irqs.patch. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- sound/oss/i810_audio.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'sound') diff --git a/sound/oss/i810_audio.c b/sound/oss/i810_audio.c index b9a640fe48b1..4600cd6742ce 100644 --- a/sound/oss/i810_audio.c +++ b/sound/oss/i810_audio.c @@ -3359,12 +3359,6 @@ static int __devinit i810_probe(struct pci_dev *pci_dev, const struct pci_device goto out_region2; } - if (request_irq(card->irq, &i810_interrupt, SA_SHIRQ, - card_names[pci_id->driver_data], card)) { - printk(KERN_ERR "i810_audio: unable to allocate irq %d\n", card->irq); - goto out_pio; - } - if (card->use_mmio) { if (request_mem_region(card->ac97base_mmio_phys, 512, "ich_audio MMBAR")) { if ((card->ac97base_mmio = ioremap(card->ac97base_mmio_phys, 512))) { /*@FIXME can ioremap fail? don't know (jsaw) */ @@ -3395,10 +3389,8 @@ static int __devinit i810_probe(struct pci_dev *pci_dev, const struct pci_device } /* initialize AC97 codec and register /dev/mixer */ - if (i810_ac97_init(card) <= 0) { - free_irq(card->irq, card); + if (i810_ac97_init(card) <= 0) goto out_iospace; - } pci_set_drvdata(pci_dev, card); if(clocking == 0) { @@ -3410,7 +3402,6 @@ static int __devinit i810_probe(struct pci_dev *pci_dev, const struct pci_device if ((card->dev_audio = register_sound_dsp(&i810_audio_fops, -1)) < 0) { int i; printk(KERN_ERR "i810_audio: couldn't register DSP device!\n"); - free_irq(card->irq, card); for (i = 0; i < NR_AC97; i++) if (card->ac97_codec[i] != NULL) { unregister_sound_mixer(card->ac97_codec[i]->dev_mixer); @@ -3419,6 +3410,13 @@ static int __devinit i810_probe(struct pci_dev *pci_dev, const struct pci_device goto out_iospace; } + if (request_irq(card->irq, &i810_interrupt, SA_SHIRQ, + card_names[pci_id->driver_data], card)) { + printk(KERN_ERR "i810_audio: unable to allocate irq %d\n", card->irq); + goto out_iospace; + } + + card->initializing = 0; return 0; -- cgit v1.2.2 From 46654728b55bf5d09dc91fa45f532131d8a609f2 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 6 Dec 2005 15:33:15 -0800 Subject: [PATCH] drivers/sound/oss: Replace pci_module_init() with pci_register_driver() Replace obsolete pci_module_init() with pci_register_driver(). Signed-off-by: Greg Kroah-Hartman Signed-off-by: Richard Knutsson --- sound/oss/ad1889.c | 2 +- sound/oss/btaudio.c | 2 +- sound/oss/cmpci.c | 2 +- sound/oss/cs4281/cs4281m.c | 2 +- sound/oss/cs46xx.c | 2 +- sound/oss/emu10k1/main.c | 2 +- sound/oss/es1370.c | 2 +- sound/oss/es1371.c | 2 +- sound/oss/ite8172.c | 2 +- sound/oss/kahlua.c | 2 +- sound/oss/maestro.c | 2 +- sound/oss/nec_vrc5477.c | 2 +- sound/oss/nm256_audio.c | 2 +- sound/oss/rme96xx.c | 2 +- sound/oss/sonicvibes.c | 2 +- sound/oss/ymfpci.c | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) (limited to 'sound') diff --git a/sound/oss/ad1889.c b/sound/oss/ad1889.c index 2cfd214e4c2a..a0d73f343100 100644 --- a/sound/oss/ad1889.c +++ b/sound/oss/ad1889.c @@ -1089,7 +1089,7 @@ static struct pci_driver ad1889_driver = { static int __init ad1889_init_module(void) { - return pci_module_init(&ad1889_driver); + return pci_register_driver(&ad1889_driver); } static void ad1889_exit_module(void) diff --git a/sound/oss/btaudio.c b/sound/oss/btaudio.c index a85093fec7be..4007a5680acb 100644 --- a/sound/oss/btaudio.c +++ b/sound/oss/btaudio.c @@ -1101,7 +1101,7 @@ static int btaudio_init_module(void) digital ? "digital" : "", analog && digital ? "+" : "", analog ? "analog" : ""); - return pci_module_init(&btaudio_pci_driver); + return pci_register_driver(&btaudio_pci_driver); } static void btaudio_cleanup_module(void) diff --git a/sound/oss/cmpci.c b/sound/oss/cmpci.c index 74dcca78c6c0..7cfbb08db537 100644 --- a/sound/oss/cmpci.c +++ b/sound/oss/cmpci.c @@ -3366,7 +3366,7 @@ static struct pci_driver cm_driver = { static int __init init_cmpci(void) { printk(KERN_INFO "cmpci: version $Revision: 6.82 $ time " __TIME__ " " __DATE__ "\n"); - return pci_module_init(&cm_driver); + return pci_register_driver(&cm_driver); } static void __exit cleanup_cmpci(void) diff --git a/sound/oss/cs4281/cs4281m.c b/sound/oss/cs4281/cs4281m.c index 46dd41dc2a34..0720365f6438 100644 --- a/sound/oss/cs4281/cs4281m.c +++ b/sound/oss/cs4281/cs4281m.c @@ -4461,7 +4461,7 @@ static int __init cs4281_init_module(void) printk(KERN_INFO "cs4281: version v%d.%02d.%d time " __TIME__ " " __DATE__ "\n", CS4281_MAJOR_VERSION, CS4281_MINOR_VERSION, CS4281_ARCH); - rtn = pci_module_init(&cs4281_pci_driver); + rtn = pci_register_driver(&cs4281_pci_driver); CS_DBGOUT(CS_INIT | CS_FUNCTION, 2, printk(KERN_INFO "cs4281: cs4281_init_module()- (%d)\n",rtn)); diff --git a/sound/oss/cs46xx.c b/sound/oss/cs46xx.c index 0da4d93f04a6..58e25c82eaf2 100644 --- a/sound/oss/cs46xx.c +++ b/sound/oss/cs46xx.c @@ -5690,7 +5690,7 @@ static int __init cs46xx_init_module(void) int rtn = 0; CS_DBGOUT(CS_INIT | CS_FUNCTION, 2, printk(KERN_INFO "cs46xx: cs46xx_init_module()+ \n")); - rtn = pci_module_init(&cs46xx_pci_driver); + rtn = pci_register_driver(&cs46xx_pci_driver); if(rtn == -ENODEV) { diff --git a/sound/oss/emu10k1/main.c b/sound/oss/emu10k1/main.c index 9b905bae423e..23241cbdd90f 100644 --- a/sound/oss/emu10k1/main.c +++ b/sound/oss/emu10k1/main.c @@ -1428,7 +1428,7 @@ static int __init emu10k1_init_module(void) { printk(KERN_INFO "Creative EMU10K1 PCI Audio Driver, version " DRIVER_VERSION ", " __TIME__ " " __DATE__ "\n"); - return pci_module_init(&emu10k1_pci_driver); + return pci_register_driver(&emu10k1_pci_driver); } static void __exit emu10k1_cleanup_module(void) diff --git a/sound/oss/es1370.c b/sound/oss/es1370.c index 8538085086e7..ae55c536613a 100644 --- a/sound/oss/es1370.c +++ b/sound/oss/es1370.c @@ -2779,7 +2779,7 @@ static struct pci_driver es1370_driver = { static int __init init_es1370(void) { printk(KERN_INFO "es1370: version v0.38 time " __TIME__ " " __DATE__ "\n"); - return pci_module_init(&es1370_driver); + return pci_register_driver(&es1370_driver); } static void __exit cleanup_es1370(void) diff --git a/sound/oss/es1371.c b/sound/oss/es1371.c index 12a56d5ab498..5c697f162579 100644 --- a/sound/oss/es1371.c +++ b/sound/oss/es1371.c @@ -3090,7 +3090,7 @@ static struct pci_driver es1371_driver = { static int __init init_es1371(void) { printk(KERN_INFO PFX "version v0.32 time " __TIME__ " " __DATE__ "\n"); - return pci_module_init(&es1371_driver); + return pci_register_driver(&es1371_driver); } static void __exit cleanup_es1371(void) diff --git a/sound/oss/ite8172.c b/sound/oss/ite8172.c index 26e5944b6ba8..8fd2f9a9e668 100644 --- a/sound/oss/ite8172.c +++ b/sound/oss/ite8172.c @@ -2206,7 +2206,7 @@ static struct pci_driver it8172_driver = { static int __init init_it8172(void) { info("version v0.5 time " __TIME__ " " __DATE__); - return pci_module_init(&it8172_driver); + return pci_register_driver(&it8172_driver); } static void __exit cleanup_it8172(void) diff --git a/sound/oss/kahlua.c b/sound/oss/kahlua.c index 808c5ef969be..2835a7c038ef 100644 --- a/sound/oss/kahlua.c +++ b/sound/oss/kahlua.c @@ -218,7 +218,7 @@ static struct pci_driver kahlua_driver = { static int __init kahlua_init_module(void) { printk(KERN_INFO "Cyrix Kahlua VSA1 XpressAudio support (c) Copyright 2003 Red Hat Inc\n"); - return pci_module_init(&kahlua_driver); + return pci_register_driver(&kahlua_driver); } static void __devexit kahlua_cleanup_module(void) diff --git a/sound/oss/maestro.c b/sound/oss/maestro.c index f9ac5b16f61a..d4b569acf764 100644 --- a/sound/oss/maestro.c +++ b/sound/oss/maestro.c @@ -3624,7 +3624,7 @@ static int __init init_maestro(void) { int rc; - rc = pci_module_init(&maestro_pci_driver); + rc = pci_register_driver(&maestro_pci_driver); if (rc < 0) return rc; diff --git a/sound/oss/nec_vrc5477.c b/sound/oss/nec_vrc5477.c index 9ac4bf7e1e89..fbb9170e8e0a 100644 --- a/sound/oss/nec_vrc5477.c +++ b/sound/oss/nec_vrc5477.c @@ -2045,7 +2045,7 @@ static struct pci_driver vrc5477_ac97_driver = { static int __init init_vrc5477_ac97(void) { printk("Vrc5477 AC97 driver: version v0.2 time " __TIME__ " " __DATE__ " by Jun Sun\n"); - return pci_module_init(&vrc5477_ac97_driver); + return pci_register_driver(&vrc5477_ac97_driver); } static void __exit cleanup_vrc5477_ac97(void) diff --git a/sound/oss/nm256_audio.c b/sound/oss/nm256_audio.c index 42d8f05689c2..7de079b202f2 100644 --- a/sound/oss/nm256_audio.c +++ b/sound/oss/nm256_audio.c @@ -1644,7 +1644,7 @@ module_param(force_load, bool, 0); static int __init do_init_nm256(void) { printk (KERN_INFO "NeoMagic 256AV/256ZX audio driver, version 1.1p\n"); - return pci_module_init(&nm256_pci_driver); + return pci_register_driver(&nm256_pci_driver); } static void __exit cleanup_nm256 (void) diff --git a/sound/oss/rme96xx.c b/sound/oss/rme96xx.c index 318dc51009fe..faa0b7919b65 100644 --- a/sound/oss/rme96xx.c +++ b/sound/oss/rme96xx.c @@ -1095,7 +1095,7 @@ static int __init init_rme96xx(void) devices = ((devices-1) & RME96xx_MASK_DEVS) + 1; printk(KERN_INFO RME_MESS" reserving %d dsp device(s)\n",devices); numcards = 0; - return pci_module_init(&rme96xx_driver); + return pci_register_driver(&rme96xx_driver); } static void __exit cleanup_rme96xx(void) diff --git a/sound/oss/sonicvibes.c b/sound/oss/sonicvibes.c index 17d0e461f8d8..71b05e2f6977 100644 --- a/sound/oss/sonicvibes.c +++ b/sound/oss/sonicvibes.c @@ -2765,7 +2765,7 @@ static int __init init_sonicvibes(void) if (!(wavetable_mem = __get_free_pages(GFP_KERNEL, 20-PAGE_SHIFT))) printk(KERN_INFO "sv: cannot allocate 1MB of contiguous nonpageable memory for wavetable data\n"); #endif - return pci_module_init(&sv_driver); + return pci_register_driver(&sv_driver); } static void __exit cleanup_sonicvibes(void) diff --git a/sound/oss/ymfpci.c b/sound/oss/ymfpci.c index 8dae59bd05a2..f8bd72e46f57 100644 --- a/sound/oss/ymfpci.c +++ b/sound/oss/ymfpci.c @@ -2680,7 +2680,7 @@ static struct pci_driver ymfpci_driver = { static int __init ymf_init_module(void) { - return pci_module_init(&ymfpci_driver); + return pci_register_driver(&ymfpci_driver); } static void __exit ymf_cleanup_module (void) -- cgit v1.2.2 From 93b1fae49189d82bca38f47334e9853e44105ced Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Tue, 10 Jan 2006 00:13:33 +0100 Subject: spelling: s/trough/through/ Additionally, one comment was reformulated by Joe Perches . Signed-off-by: Adrian Bunk --- sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c b/sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c index 09cb250d5827..962e6d525564 100644 --- a/sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c +++ b/sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c @@ -209,7 +209,7 @@ static int pdacf_pcm_prepare(struct snd_pcm_substream *subs) case SNDRV_PCM_FORMAT_S24_3LE: case SNDRV_PCM_FORMAT_S24_3BE: chip->pcm_sample = 3; - /* fall trough */ + /* fall through */ default: /* 24-bit */ aval = AK4117_DIF_24R; chip->pcm_frame = 3; -- cgit v1.2.2 From 1b1dcc1b57a49136f118a0f16367256ff9994a69 Mon Sep 17 00:00:00 2001 From: Jes Sorensen Date: Mon, 9 Jan 2006 15:59:24 -0800 Subject: [PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_sem This patch converts the inode semaphore to a mutex. I have tested it on XFS and compiled as much as one can consider on an ia64. Anyway your luck with it might be different. Modified-by: Ingo Molnar (finished the conversion) Signed-off-by: Jes Sorensen Signed-off-by: Ingo Molnar --- sound/core/oss/pcm_oss.c | 2 -- sound/core/seq/seq_memory.c | 4 ---- 2 files changed, 6 deletions(-) (limited to 'sound') diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c index 16df1246a131..7fd072392c7e 100644 --- a/sound/core/oss/pcm_oss.c +++ b/sound/core/oss/pcm_oss.c @@ -2135,9 +2135,7 @@ static ssize_t snd_pcm_oss_write(struct file *file, const char __user *buf, size substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK]; if (substream == NULL) return -ENXIO; - up(&file->f_dentry->d_inode->i_sem); result = snd_pcm_oss_write1(substream, buf, count); - down(&file->f_dentry->d_inode->i_sem); #ifdef OSS_DEBUG printk("pcm_oss: write %li bytes (wrote %li bytes)\n", (long)count, (long)result); #endif diff --git a/sound/core/seq/seq_memory.c b/sound/core/seq/seq_memory.c index 9ee6c177db0c..40b4f679c80e 100644 --- a/sound/core/seq/seq_memory.c +++ b/sound/core/seq/seq_memory.c @@ -32,10 +32,6 @@ #include "seq_info.h" #include "seq_lock.h" -/* semaphore in struct file record */ -#define semaphore_of(fp) ((fp)->f_dentry->d_inode->i_sem) - - static inline int snd_seq_pool_available(struct snd_seq_pool *pool) { return pool->total_elements - atomic_read(&pool->counter); -- cgit v1.2.2 From e329113ca437e44ec399b7ffe114ed36e84ccf5e Mon Sep 17 00:00:00 2001 From: Ben Gardner Date: Mon, 9 Jan 2006 20:51:29 -0800 Subject: [PATCH] i386: GPIO driver for AMD CS5535/CS5536 A simple driver for the CS5535 and CS5536 that allows a user-space program to manipulate GPIO pins. The CS5535/CS5536 chips are Geode processor companion devices. Signed-off-by: Ben Gardner Signed-off-by: Richard Knutsson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- sound/pci/cs5535audio/cs5535audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/pci/cs5535audio/cs5535audio.c b/sound/pci/cs5535audio/cs5535audio.c index 202c7cf3e328..f36ede827479 100644 --- a/sound/pci/cs5535audio/cs5535audio.c +++ b/sound/pci/cs5535audio/cs5535audio.c @@ -385,7 +385,7 @@ static struct pci_driver driver = { static int __init alsa_card_cs5535audio_init(void) { - return pci_module_init(&driver); + return pci_register_driver(&driver); } static void __exit alsa_card_cs5535audio_exit(void) -- cgit v1.2.2 From 49efdd46eed353027096a765f40dd8af52ece5ae Mon Sep 17 00:00:00 2001 From: Stuart Brady Date: Tue, 10 Jan 2006 20:47:58 -0500 Subject: [PARISC] OSS: Fix build of parisc harmony driver OSS Harmony got missed on the conversion of parisc_device.hpa to a struct resource... fix its build. Signed-off-by: Stuart Brady Signed-off-by: Kyle McMartin --- sound/oss/harmony.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sound') diff --git a/sound/oss/harmony.c b/sound/oss/harmony.c index bee9d344cd26..591683c55f27 100644 --- a/sound/oss/harmony.c +++ b/sound/oss/harmony.c @@ -1236,7 +1236,7 @@ harmony_driver_probe(struct parisc_device *dev) } /* Set the HPA of harmony */ - harmony.hpa = (struct harmony_hpa *)dev->hpa; + harmony.hpa = (struct harmony_hpa *)dev->hpa.start; harmony.dev = dev; /* Grab the ID and revision from the device */ @@ -1250,7 +1250,7 @@ harmony_driver_probe(struct parisc_device *dev) printk(KERN_INFO "Lasi Harmony Audio driver " HARMONY_VERSION ", " "h/w id %i, rev. %i at 0x%lx, IRQ %i\n", - id, rev, dev->hpa, harmony.dev->irq); + id, rev, dev->hpa.start, harmony.dev->irq); /* Make sure the control bit isn't set, although I don't think it ever is. */ -- cgit v1.2.2 From 5c908a74d90e693d9079f4238012d43b06231a70 Mon Sep 17 00:00:00 2001 From: Jesper Juhl Date: Wed, 11 Jan 2006 12:17:43 -0800 Subject: [PATCH] remove unused out_pio label in i810_audio sound/oss/i810_audio.c:3431: warning: label `out_pio' defined but not used Signed-off-by: Jesper Juhl Signed-off-by: Linus Torvalds --- sound/oss/i810_audio.c | 1 - 1 file changed, 1 deletion(-) (limited to 'sound') diff --git a/sound/oss/i810_audio.c b/sound/oss/i810_audio.c index 4600cd6742ce..51a1b1b7b9c1 100644 --- a/sound/oss/i810_audio.c +++ b/sound/oss/i810_audio.c @@ -3427,7 +3427,6 @@ out_iospace: release_mem_region(card->ac97base_mmio_phys, 512); release_mem_region(card->iobase_mmio_phys, 256); } -out_pio: release_region(card->ac97base, 256); out_region2: release_region(card->iobase, 64); -- cgit v1.2.2 From c59ede7b78db329949d9cdcd7064e22d357560ef Mon Sep 17 00:00:00 2001 From: "Randy.Dunlap" Date: Wed, 11 Jan 2006 12:17:46 -0800 Subject: [PATCH] move capable() to capability.h - Move capable() from sched.h to capability.h; - Use where capable() is used (in include/, block/, ipc/, kernel/, a few drivers/, mm/, security/, & sound/; many more drivers/ to go) Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- sound/pci/emu10k1/emufx.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sound') diff --git a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c index 1a903390ad6d..509837252735 100644 --- a/sound/pci/emu10k1/emufx.c +++ b/sound/pci/emu10k1/emufx.c @@ -27,6 +27,7 @@ #include #include +#include #include #include #include -- cgit v1.2.2 From 3d831d925c6d66569a0c7f6f5f17c0927f7d3d25 Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Wed, 11 Jan 2006 22:44:51 +0100 Subject: [PATCH] x86_64: Enable sound in old style OSS driver for NForce4 CK804 Just add the missing PCI ID. Cc: perex@suse.cz Cc: tiwai@suse.de Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds --- sound/oss/i810_audio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/oss/i810_audio.c b/sound/oss/i810_audio.c index 51a1b1b7b9c1..abc242abd5b1 100644 --- a/sound/oss/i810_audio.c +++ b/sound/oss/i810_audio.c @@ -312,7 +312,8 @@ static struct pci_device_id i810_pci_tbl [] = { PCI_ANY_ID, PCI_ANY_ID, 0, 0, INTELICH4}, {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_18, PCI_ANY_ID, PCI_ANY_ID, 0, 0, INTELICH4}, - + {PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_CK804_AUDIO, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, NVIDIA_NFORCE}, {0,} }; -- cgit v1.2.2 From b4290a23cfa9040e2f0de5ab57d6ea65abaf053b Mon Sep 17 00:00:00 2001 From: Al Viro Date: Thu, 12 Jan 2006 01:06:12 -0800 Subject: [PATCH] m68k: namespace pollution fix (custom->amiga_custom) in amigahw.h custom renamed to amiga_custom, in drivers with few instances the same replacement, in the rest - #define custom amiga_custom in driver itself Signed-off-by: Al Viro Cc: Roman Zippel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- sound/oss/dmasound/dmasound_paula.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sound') diff --git a/sound/oss/dmasound/dmasound_paula.c b/sound/oss/dmasound/dmasound_paula.c index d59f60b26410..f163868e7526 100644 --- a/sound/oss/dmasound/dmasound_paula.c +++ b/sound/oss/dmasound/dmasound_paula.c @@ -34,6 +34,7 @@ #define DMASOUND_PAULA_REVISION 0 #define DMASOUND_PAULA_EDITION 4 +#define custom amiga_custom /* * The minimum period for audio depends on htotal (for OCS/ECS/AGA) * (Imported from arch/m68k/amiga/amisound.c) -- cgit v1.2.2 From 815f597be444e5f9f5b4dbd65b862208d5253598 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Thu, 12 Jan 2006 01:06:21 -0800 Subject: [PATCH] m68k: dmasound_paula.c lvalues abuse (from m68k CVS) Avoid warnings about use of cast expressions as lvalues Signed-off-by: Roman Zippel Signed-off-by: Al Viro Cc: Roman Zippel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- sound/oss/dmasound/dmasound_paula.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sound') diff --git a/sound/oss/dmasound/dmasound_paula.c b/sound/oss/dmasound/dmasound_paula.c index f163868e7526..541781507e63 100644 --- a/sound/oss/dmasound/dmasound_paula.c +++ b/sound/oss/dmasound/dmasound_paula.c @@ -245,6 +245,7 @@ static ssize_t funcname(const u_char *userPtr, size_t userCount, \ u_char frame[], ssize_t *frameUsed, \ ssize_t frameLeft) \ { \ + const u_short *ptr = (const u_short *)userPtr; \ ssize_t count, used; \ u_short data; \ \ @@ -254,7 +255,7 @@ static ssize_t funcname(const u_char *userPtr, size_t userCount, \ count = min_t(size_t, userCount, frameLeft)>>1 & ~1; \ used = count*2; \ while (count > 0) { \ - if (get_user(data, ((u_short *)userPtr)++)) \ + if (get_user(data, ptr++)) \ return -EFAULT; \ data = convsample(data); \ *high++ = data>>8; \ @@ -269,12 +270,12 @@ static ssize_t funcname(const u_char *userPtr, size_t userCount, \ count = min_t(size_t, userCount, frameLeft)>>2 & ~1; \ used = count*4; \ while (count > 0) { \ - if (get_user(data, ((u_short *)userPtr)++)) \ + if (get_user(data, ptr++)) \ return -EFAULT; \ data = convsample(data); \ *lefth++ = data>>8; \ *leftl++ = (data>>2) & 0x3f; \ - if (get_user(data, ((u_short *)userPtr)++)) \ + if (get_user(data, ptr++)) \ return -EFAULT; \ data = convsample(data); \ *righth++ = data>>8; \ -- cgit v1.2.2 From 3756513d5fdc7b4ba814419165afcd10c6b1618d Mon Sep 17 00:00:00 2001 From: Al Viro Date: Thu, 12 Jan 2006 01:06:22 -0800 Subject: [PATCH] m68k: lvalues abuse in dmasound Cast is not an lvalue Signed-off-by: Al Viro Cc: Roman Zippel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- sound/oss/dmasound/dmasound_atari.c | 54 ++++++++++++++++++++++++------------- 1 file changed, 36 insertions(+), 18 deletions(-) (limited to 'sound') diff --git a/sound/oss/dmasound/dmasound_atari.c b/sound/oss/dmasound/dmasound_atari.c index 59eb53f89318..b747e77238f8 100644 --- a/sound/oss/dmasound/dmasound_atari.c +++ b/sound/oss/dmasound/dmasound_atari.c @@ -217,8 +217,9 @@ static ssize_t ata_ct_u8(const u_char *userPtr, size_t userCount, used = count*2; while (count > 0) { u_short data; - if (get_user(data, ((u_short *)userPtr)++)) + if (get_user(data, (u_short *)userPtr)) return -EFAULT; + userPtr += 2; *p++ = data ^ 0x8080; count--; } @@ -240,8 +241,9 @@ static ssize_t ata_ct_s16be(const u_char *userPtr, size_t userCount, used = count*2; while (count > 0) { u_short data; - if (get_user(data, ((u_short *)userPtr)++)) + if (get_user(data, (u_short *)userPtr)) return -EFAULT; + userPtr += 2; *p++ = data; *p++ = data; count--; @@ -271,8 +273,9 @@ static ssize_t ata_ct_u16be(const u_char *userPtr, size_t userCount, used = count*2; while (count > 0) { u_short data; - if (get_user(data, ((u_short *)userPtr)++)) + if (get_user(data, (u_short *)userPtr)) return -EFAULT; + userPtr += 2; data ^= 0x8000; *p++ = data; *p++ = data; @@ -285,8 +288,9 @@ static ssize_t ata_ct_u16be(const u_char *userPtr, size_t userCount, used = count*4; while (count > 0) { u_long data; - if (get_user(data, ((u_int *)userPtr)++)) + if (get_user(data, (u_int *)userPtr)) return -EFAULT; + userPtr += 4; *p++ = data ^ 0x80008000; count--; } @@ -309,8 +313,9 @@ static ssize_t ata_ct_s16le(const u_char *userPtr, size_t userCount, used = count*2; while (count > 0) { u_short data; - if (get_user(data, ((u_short *)userPtr)++)) + if (get_user(data, (u_short *)userPtr)) return -EFAULT; + userPtr += 2; data = le2be16(data); *p++ = data; *p++ = data; @@ -323,8 +328,9 @@ static ssize_t ata_ct_s16le(const u_char *userPtr, size_t userCount, used = count*4; while (count > 0) { u_long data; - if (get_user(data, ((u_int *)userPtr)++)) + if (get_user(data, (u_int *)userPtr)) return -EFAULT; + userPtr += 4; data = le2be16dbl(data); *p++ = data; count--; @@ -348,8 +354,9 @@ static ssize_t ata_ct_u16le(const u_char *userPtr, size_t userCount, used = count*2; while (count > 0) { u_short data; - if (get_user(data, ((u_short *)userPtr)++)) + if (get_user(data, (u_short *)userPtr)) return -EFAULT; + userPtr += 2; data = le2be16(data) ^ 0x8000; *p++ = data; *p++ = data; @@ -361,8 +368,9 @@ static ssize_t ata_ct_u16le(const u_char *userPtr, size_t userCount, used = count; while (count > 0) { u_long data; - if (get_user(data, ((u_int *)userPtr)++)) + if (get_user(data, (u_int *)userPtr)) return -EFAULT; + userPtr += 4; data = le2be16dbl(data) ^ 0x80008000; *p++ = data; count--; @@ -470,8 +478,9 @@ static ssize_t ata_ctx_s8(const u_char *userPtr, size_t userCount, if (bal < 0) { if (userCount < 2) break; - if (get_user(data, ((u_short *)userPtr)++)) + if (get_user(data, (u_short *)userPtr)) return -EFAULT; + userPtr += 2; userCount -= 2; bal += hSpeed; } @@ -524,8 +533,9 @@ static ssize_t ata_ctx_u8(const u_char *userPtr, size_t userCount, if (bal < 0) { if (userCount < 2) break; - if (get_user(data, ((u_short *)userPtr)++)) + if (get_user(data, (u_short *)userPtr)) return -EFAULT; + userPtr += 2; data ^= 0x8080; userCount -= 2; bal += hSpeed; @@ -561,8 +571,9 @@ static ssize_t ata_ctx_s16be(const u_char *userPtr, size_t userCount, if (bal < 0) { if (userCount < 2) break; - if (get_user(data, ((u_short *)userPtr)++)) + if (get_user(data, (u_short *)userPtr)) return -EFAULT; + userPtr += 2; userCount -= 2; bal += hSpeed; } @@ -579,8 +590,9 @@ static ssize_t ata_ctx_s16be(const u_char *userPtr, size_t userCount, if (bal < 0) { if (userCount < 4) break; - if (get_user(data, ((u_int *)userPtr)++)) + if (get_user(data, (u_int *)userPtr)) return -EFAULT; + userPtr += 4; userCount -= 4; bal += hSpeed; } @@ -615,8 +627,9 @@ static ssize_t ata_ctx_u16be(const u_char *userPtr, size_t userCount, if (bal < 0) { if (userCount < 2) break; - if (get_user(data, ((u_short *)userPtr)++)) + if (get_user(data, (u_short *)userPtr)) return -EFAULT; + userPtr += 2; data ^= 0x8000; userCount -= 2; bal += hSpeed; @@ -634,8 +647,9 @@ static ssize_t ata_ctx_u16be(const u_char *userPtr, size_t userCount, if (bal < 0) { if (userCount < 4) break; - if (get_user(data, ((u_int *)userPtr)++)) + if (get_user(data, (u_int *)userPtr)) return -EFAULT; + userPtr += 4; data ^= 0x80008000; userCount -= 4; bal += hSpeed; @@ -671,8 +685,9 @@ static ssize_t ata_ctx_s16le(const u_char *userPtr, size_t userCount, if (bal < 0) { if (userCount < 2) break; - if (get_user(data, ((u_short *)userPtr)++)) + if (get_user(data, (u_short *)userPtr)) return -EFAULT; + userPtr += 2; data = le2be16(data); userCount -= 2; bal += hSpeed; @@ -690,8 +705,9 @@ static ssize_t ata_ctx_s16le(const u_char *userPtr, size_t userCount, if (bal < 0) { if (userCount < 4) break; - if (get_user(data, ((u_int *)userPtr)++)) + if (get_user(data, (u_int *)userPtr)) return -EFAULT; + userPtr += 4; data = le2be16dbl(data); userCount -= 4; bal += hSpeed; @@ -727,8 +743,9 @@ static ssize_t ata_ctx_u16le(const u_char *userPtr, size_t userCount, if (bal < 0) { if (userCount < 2) break; - if (get_user(data, ((u_short *)userPtr)++)) + if (get_user(data, (u_short *)userPtr)) return -EFAULT; + userPtr += 2; data = le2be16(data) ^ 0x8000; userCount -= 2; bal += hSpeed; @@ -746,8 +763,9 @@ static ssize_t ata_ctx_u16le(const u_char *userPtr, size_t userCount, if (bal < 0) { if (userCount < 4) break; - if (get_user(data, ((u_int *)userPtr)++)) + if (get_user(data, (u_int *)userPtr)) return -EFAULT; + userPtr += 4; data = le2be16dbl(data) ^ 0x80008000; userCount -= 4; bal += hSpeed; -- cgit v1.2.2 From 9a4729118c8851bce709a00eba1b3a8f1fd9ed58 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Thu, 12 Jan 2006 01:06:23 -0800 Subject: [PATCH] m68k: compile fixes for dmasound (static vs. extern) sound/oss/dmasound/dmasound_atari.c has static expand_bal sound/oss/dmasound/dmasound_q40.c has static expand_bal sound/oss/dmasound/dmasound_awacs.c has non-static expand_bal sound/oss/dmasound/trans_16.c uses expand_bal from dmasound_awacs.c all 4 include dmasound.h; extern for expand_bal used to be there, which is a bloody bad idea, considering _atari and _q40. Moved the extern to trans_16.c. Signed-off-by: Al Viro Cc: Roman Zippel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- sound/oss/dmasound/dmasound.h | 1 - sound/oss/dmasound/trans_16.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/oss/dmasound/dmasound.h b/sound/oss/dmasound/dmasound.h index 222014cafc1a..a1b0b92af4b5 100644 --- a/sound/oss/dmasound/dmasound.h +++ b/sound/oss/dmasound/dmasound.h @@ -270,7 +270,6 @@ extern int dmasound_catchRadius; #define SW_INPUT_VOLUME_SCALE 4 #define SW_INPUT_VOLUME_DEFAULT (128 / SW_INPUT_VOLUME_SCALE) -extern int expand_bal; /* Balance factor for expanding (not volume!) */ extern int expand_read_bal; /* Balance factor for reading */ extern uint software_input_volume; /* software implemented recording volume! */ diff --git a/sound/oss/dmasound/trans_16.c b/sound/oss/dmasound/trans_16.c index 23562e947806..ca973ac2a30a 100644 --- a/sound/oss/dmasound/trans_16.c +++ b/sound/oss/dmasound/trans_16.c @@ -17,6 +17,7 @@ #include #include "dmasound.h" +extern int expand_bal; /* Balance factor for expanding (not volume!) */ static short dmasound_alaw2dma16[] ; static short dmasound_ulaw2dma16[] ; -- cgit v1.2.2 From 031eb4cddec7a4825212ece47de4bd64cd8e0bee Mon Sep 17 00:00:00 2001 From: Al Viro Date: Thu, 12 Jan 2006 01:06:33 -0800 Subject: [PATCH] m68k: dmasound __user annotations Signed-off-by: Al Viro Cc: Roman Zippel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- sound/oss/dmasound/dmasound_atari.c | 94 ++++++++++++++++++------------------- sound/oss/dmasound/dmasound_paula.c | 8 ++-- sound/oss/dmasound/dmasound_q40.c | 18 +++---- 3 files changed, 60 insertions(+), 60 deletions(-) (limited to 'sound') diff --git a/sound/oss/dmasound/dmasound_atari.c b/sound/oss/dmasound/dmasound_atari.c index b747e77238f8..dc31373069a5 100644 --- a/sound/oss/dmasound/dmasound_atari.c +++ b/sound/oss/dmasound/dmasound_atari.c @@ -67,46 +67,46 @@ static int expand_data; /* Data for expanding */ * ++geert: split in even more functions (one per format) */ -static ssize_t ata_ct_law(const u_char *userPtr, size_t userCount, +static ssize_t ata_ct_law(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft); -static ssize_t ata_ct_s8(const u_char *userPtr, size_t userCount, +static ssize_t ata_ct_s8(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft); -static ssize_t ata_ct_u8(const u_char *userPtr, size_t userCount, +static ssize_t ata_ct_u8(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft); -static ssize_t ata_ct_s16be(const u_char *userPtr, size_t userCount, +static ssize_t ata_ct_s16be(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft); -static ssize_t ata_ct_u16be(const u_char *userPtr, size_t userCount, +static ssize_t ata_ct_u16be(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft); -static ssize_t ata_ct_s16le(const u_char *userPtr, size_t userCount, +static ssize_t ata_ct_s16le(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft); -static ssize_t ata_ct_u16le(const u_char *userPtr, size_t userCount, +static ssize_t ata_ct_u16le(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft); -static ssize_t ata_ctx_law(const u_char *userPtr, size_t userCount, +static ssize_t ata_ctx_law(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft); -static ssize_t ata_ctx_s8(const u_char *userPtr, size_t userCount, +static ssize_t ata_ctx_s8(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft); -static ssize_t ata_ctx_u8(const u_char *userPtr, size_t userCount, +static ssize_t ata_ctx_u8(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft); -static ssize_t ata_ctx_s16be(const u_char *userPtr, size_t userCount, +static ssize_t ata_ctx_s16be(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft); -static ssize_t ata_ctx_u16be(const u_char *userPtr, size_t userCount, +static ssize_t ata_ctx_u16be(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft); -static ssize_t ata_ctx_s16le(const u_char *userPtr, size_t userCount, +static ssize_t ata_ctx_s16le(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft); -static ssize_t ata_ctx_u16le(const u_char *userPtr, size_t userCount, +static ssize_t ata_ctx_u16le(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft); @@ -151,7 +151,7 @@ static int FalconStateInfo(char *buffer, size_t space); /*** Translations ************************************************************/ -static ssize_t ata_ct_law(const u_char *userPtr, size_t userCount, +static ssize_t ata_ct_law(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft) { @@ -176,7 +176,7 @@ static ssize_t ata_ct_law(const u_char *userPtr, size_t userCount, } -static ssize_t ata_ct_s8(const u_char *userPtr, size_t userCount, +static ssize_t ata_ct_s8(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft) { @@ -194,7 +194,7 @@ static ssize_t ata_ct_s8(const u_char *userPtr, size_t userCount, } -static ssize_t ata_ct_u8(const u_char *userPtr, size_t userCount, +static ssize_t ata_ct_u8(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft) { @@ -217,7 +217,7 @@ static ssize_t ata_ct_u8(const u_char *userPtr, size_t userCount, used = count*2; while (count > 0) { u_short data; - if (get_user(data, (u_short *)userPtr)) + if (get_user(data, (u_short __user *)userPtr)) return -EFAULT; userPtr += 2; *p++ = data ^ 0x8080; @@ -229,7 +229,7 @@ static ssize_t ata_ct_u8(const u_char *userPtr, size_t userCount, } -static ssize_t ata_ct_s16be(const u_char *userPtr, size_t userCount, +static ssize_t ata_ct_s16be(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft) { @@ -241,7 +241,7 @@ static ssize_t ata_ct_s16be(const u_char *userPtr, size_t userCount, used = count*2; while (count > 0) { u_short data; - if (get_user(data, (u_short *)userPtr)) + if (get_user(data, (u_short __user *)userPtr)) return -EFAULT; userPtr += 2; *p++ = data; @@ -261,7 +261,7 @@ static ssize_t ata_ct_s16be(const u_char *userPtr, size_t userCount, } -static ssize_t ata_ct_u16be(const u_char *userPtr, size_t userCount, +static ssize_t ata_ct_u16be(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft) { @@ -273,7 +273,7 @@ static ssize_t ata_ct_u16be(const u_char *userPtr, size_t userCount, used = count*2; while (count > 0) { u_short data; - if (get_user(data, (u_short *)userPtr)) + if (get_user(data, (u_short __user *)userPtr)) return -EFAULT; userPtr += 2; data ^= 0x8000; @@ -287,8 +287,8 @@ static ssize_t ata_ct_u16be(const u_char *userPtr, size_t userCount, count = min_t(unsigned long, userCount, frameLeft)>>2; used = count*4; while (count > 0) { - u_long data; - if (get_user(data, (u_int *)userPtr)) + u_int data; + if (get_user(data, (u_int __user *)userPtr)) return -EFAULT; userPtr += 4; *p++ = data ^ 0x80008000; @@ -300,7 +300,7 @@ static ssize_t ata_ct_u16be(const u_char *userPtr, size_t userCount, } -static ssize_t ata_ct_s16le(const u_char *userPtr, size_t userCount, +static ssize_t ata_ct_s16le(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft) { @@ -313,7 +313,7 @@ static ssize_t ata_ct_s16le(const u_char *userPtr, size_t userCount, used = count*2; while (count > 0) { u_short data; - if (get_user(data, (u_short *)userPtr)) + if (get_user(data, (u_short __user *)userPtr)) return -EFAULT; userPtr += 2; data = le2be16(data); @@ -328,7 +328,7 @@ static ssize_t ata_ct_s16le(const u_char *userPtr, size_t userCount, used = count*4; while (count > 0) { u_long data; - if (get_user(data, (u_int *)userPtr)) + if (get_user(data, (u_int __user *)userPtr)) return -EFAULT; userPtr += 4; data = le2be16dbl(data); @@ -341,7 +341,7 @@ static ssize_t ata_ct_s16le(const u_char *userPtr, size_t userCount, } -static ssize_t ata_ct_u16le(const u_char *userPtr, size_t userCount, +static ssize_t ata_ct_u16le(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft) { @@ -354,7 +354,7 @@ static ssize_t ata_ct_u16le(const u_char *userPtr, size_t userCount, used = count*2; while (count > 0) { u_short data; - if (get_user(data, (u_short *)userPtr)) + if (get_user(data, (u_short __user *)userPtr)) return -EFAULT; userPtr += 2; data = le2be16(data) ^ 0x8000; @@ -368,7 +368,7 @@ static ssize_t ata_ct_u16le(const u_char *userPtr, size_t userCount, used = count; while (count > 0) { u_long data; - if (get_user(data, (u_int *)userPtr)) + if (get_user(data, (u_int __user *)userPtr)) return -EFAULT; userPtr += 4; data = le2be16dbl(data) ^ 0x80008000; @@ -381,7 +381,7 @@ static ssize_t ata_ct_u16le(const u_char *userPtr, size_t userCount, } -static ssize_t ata_ctx_law(const u_char *userPtr, size_t userCount, +static ssize_t ata_ctx_law(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft) { @@ -443,7 +443,7 @@ static ssize_t ata_ctx_law(const u_char *userPtr, size_t userCount, } -static ssize_t ata_ctx_s8(const u_char *userPtr, size_t userCount, +static ssize_t ata_ctx_s8(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft) { @@ -478,7 +478,7 @@ static ssize_t ata_ctx_s8(const u_char *userPtr, size_t userCount, if (bal < 0) { if (userCount < 2) break; - if (get_user(data, (u_short *)userPtr)) + if (get_user(data, (u_short __user *)userPtr)) return -EFAULT; userPtr += 2; userCount -= 2; @@ -497,7 +497,7 @@ static ssize_t ata_ctx_s8(const u_char *userPtr, size_t userCount, } -static ssize_t ata_ctx_u8(const u_char *userPtr, size_t userCount, +static ssize_t ata_ctx_u8(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft) { @@ -533,7 +533,7 @@ static ssize_t ata_ctx_u8(const u_char *userPtr, size_t userCount, if (bal < 0) { if (userCount < 2) break; - if (get_user(data, (u_short *)userPtr)) + if (get_user(data, (u_short __user *)userPtr)) return -EFAULT; userPtr += 2; data ^= 0x8080; @@ -553,7 +553,7 @@ static ssize_t ata_ctx_u8(const u_char *userPtr, size_t userCount, } -static ssize_t ata_ctx_s16be(const u_char *userPtr, size_t userCount, +static ssize_t ata_ctx_s16be(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft) { @@ -571,7 +571,7 @@ static ssize_t ata_ctx_s16be(const u_char *userPtr, size_t userCount, if (bal < 0) { if (userCount < 2) break; - if (get_user(data, (u_short *)userPtr)) + if (get_user(data, (u_short __user *)userPtr)) return -EFAULT; userPtr += 2; userCount -= 2; @@ -590,7 +590,7 @@ static ssize_t ata_ctx_s16be(const u_char *userPtr, size_t userCount, if (bal < 0) { if (userCount < 4) break; - if (get_user(data, (u_int *)userPtr)) + if (get_user(data, (u_int __user *)userPtr)) return -EFAULT; userPtr += 4; userCount -= 4; @@ -609,7 +609,7 @@ static ssize_t ata_ctx_s16be(const u_char *userPtr, size_t userCount, } -static ssize_t ata_ctx_u16be(const u_char *userPtr, size_t userCount, +static ssize_t ata_ctx_u16be(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft) { @@ -627,7 +627,7 @@ static ssize_t ata_ctx_u16be(const u_char *userPtr, size_t userCount, if (bal < 0) { if (userCount < 2) break; - if (get_user(data, (u_short *)userPtr)) + if (get_user(data, (u_short __user *)userPtr)) return -EFAULT; userPtr += 2; data ^= 0x8000; @@ -647,7 +647,7 @@ static ssize_t ata_ctx_u16be(const u_char *userPtr, size_t userCount, if (bal < 0) { if (userCount < 4) break; - if (get_user(data, (u_int *)userPtr)) + if (get_user(data, (u_int __user *)userPtr)) return -EFAULT; userPtr += 4; data ^= 0x80008000; @@ -667,7 +667,7 @@ static ssize_t ata_ctx_u16be(const u_char *userPtr, size_t userCount, } -static ssize_t ata_ctx_s16le(const u_char *userPtr, size_t userCount, +static ssize_t ata_ctx_s16le(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft) { @@ -685,7 +685,7 @@ static ssize_t ata_ctx_s16le(const u_char *userPtr, size_t userCount, if (bal < 0) { if (userCount < 2) break; - if (get_user(data, (u_short *)userPtr)) + if (get_user(data, (u_short __user *)userPtr)) return -EFAULT; userPtr += 2; data = le2be16(data); @@ -705,7 +705,7 @@ static ssize_t ata_ctx_s16le(const u_char *userPtr, size_t userCount, if (bal < 0) { if (userCount < 4) break; - if (get_user(data, (u_int *)userPtr)) + if (get_user(data, (u_int __user *)userPtr)) return -EFAULT; userPtr += 4; data = le2be16dbl(data); @@ -725,7 +725,7 @@ static ssize_t ata_ctx_s16le(const u_char *userPtr, size_t userCount, } -static ssize_t ata_ctx_u16le(const u_char *userPtr, size_t userCount, +static ssize_t ata_ctx_u16le(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft) { @@ -743,7 +743,7 @@ static ssize_t ata_ctx_u16le(const u_char *userPtr, size_t userCount, if (bal < 0) { if (userCount < 2) break; - if (get_user(data, (u_short *)userPtr)) + if (get_user(data, (u_short __user *)userPtr)) return -EFAULT; userPtr += 2; data = le2be16(data) ^ 0x8000; @@ -763,7 +763,7 @@ static ssize_t ata_ctx_u16le(const u_char *userPtr, size_t userCount, if (bal < 0) { if (userCount < 4) break; - if (get_user(data, (u_int *)userPtr)) + if (get_user(data, (u_int __user *)userPtr)) return -EFAULT; userPtr += 4; data = le2be16dbl(data) ^ 0x80008000; diff --git a/sound/oss/dmasound/dmasound_paula.c b/sound/oss/dmasound/dmasound_paula.c index 541781507e63..494070a3f870 100644 --- a/sound/oss/dmasound/dmasound_paula.c +++ b/sound/oss/dmasound/dmasound_paula.c @@ -157,7 +157,7 @@ static int AmiStateInfo(char *buffer, size_t space); * Native format */ -static ssize_t ami_ct_s8(const u_char *userPtr, size_t userCount, +static ssize_t ami_ct_s8(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft) { ssize_t count, used; @@ -190,7 +190,7 @@ static ssize_t ami_ct_s8(const u_char *userPtr, size_t userCount, */ #define GENERATE_AMI_CT8(funcname, convsample) \ -static ssize_t funcname(const u_char *userPtr, size_t userCount, \ +static ssize_t funcname(const u_char __user *userPtr, size_t userCount, \ u_char frame[], ssize_t *frameUsed, \ ssize_t frameLeft) \ { \ @@ -241,11 +241,11 @@ GENERATE_AMI_CT8(ami_ct_u8, AMI_CT_U8) */ #define GENERATE_AMI_CT_16(funcname, convsample) \ -static ssize_t funcname(const u_char *userPtr, size_t userCount, \ +static ssize_t funcname(const u_char __user *userPtr, size_t userCount, \ u_char frame[], ssize_t *frameUsed, \ ssize_t frameLeft) \ { \ - const u_short *ptr = (const u_short *)userPtr; \ + const u_short __user *ptr = (const u_short __user *)userPtr; \ ssize_t count, used; \ u_short data; \ \ diff --git a/sound/oss/dmasound/dmasound_q40.c b/sound/oss/dmasound/dmasound_q40.c index 1ddaa6284b08..e2081f32b0c4 100644 --- a/sound/oss/dmasound/dmasound_q40.c +++ b/sound/oss/dmasound/dmasound_q40.c @@ -58,7 +58,7 @@ static void Q40Interrupt(void); /* userCount, frameUsed, frameLeft == byte counts */ -static ssize_t q40_ct_law(const u_char *userPtr, size_t userCount, +static ssize_t q40_ct_law(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft) { @@ -79,7 +79,7 @@ static ssize_t q40_ct_law(const u_char *userPtr, size_t userCount, } -static ssize_t q40_ct_s8(const u_char *userPtr, size_t userCount, +static ssize_t q40_ct_s8(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft) { @@ -98,7 +98,7 @@ static ssize_t q40_ct_s8(const u_char *userPtr, size_t userCount, return used; } -static ssize_t q40_ct_u8(const u_char *userPtr, size_t userCount, +static ssize_t q40_ct_u8(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft) { @@ -114,7 +114,7 @@ static ssize_t q40_ct_u8(const u_char *userPtr, size_t userCount, /* a bit too complicated to optimise right now ..*/ -static ssize_t q40_ctx_law(const u_char *userPtr, size_t userCount, +static ssize_t q40_ctx_law(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft) { @@ -152,7 +152,7 @@ static ssize_t q40_ctx_law(const u_char *userPtr, size_t userCount, } -static ssize_t q40_ctx_s8(const u_char *userPtr, size_t userCount, +static ssize_t q40_ctx_s8(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft) { @@ -189,7 +189,7 @@ static ssize_t q40_ctx_s8(const u_char *userPtr, size_t userCount, } -static ssize_t q40_ctx_u8(const u_char *userPtr, size_t userCount, +static ssize_t q40_ctx_u8(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft) { @@ -224,7 +224,7 @@ static ssize_t q40_ctx_u8(const u_char *userPtr, size_t userCount, } /* compressing versions */ -static ssize_t q40_ctc_law(const u_char *userPtr, size_t userCount, +static ssize_t q40_ctc_law(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft) { @@ -265,7 +265,7 @@ static ssize_t q40_ctc_law(const u_char *userPtr, size_t userCount, } -static ssize_t q40_ctc_s8(const u_char *userPtr, size_t userCount, +static ssize_t q40_ctc_s8(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft) { @@ -304,7 +304,7 @@ static ssize_t q40_ctc_s8(const u_char *userPtr, size_t userCount, } -static ssize_t q40_ctc_u8(const u_char *userPtr, size_t userCount, +static ssize_t q40_ctc_u8(const u_char __user *userPtr, size_t userCount, u_char frame[], ssize_t *frameUsed, ssize_t frameLeft) { -- cgit v1.2.2 From 575c96871832e91983248aebb02fc072e5fd17c9 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Sun, 15 Jan 2006 02:00:17 +0100 Subject: spelling: s/appropiate/appropriate/ Signed-off-by: Adrian Bunk --- sound/oss/opl3sa2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/oss/opl3sa2.c b/sound/oss/opl3sa2.c index 5cecdbcbea9d..0e161c6a0477 100644 --- a/sound/oss/opl3sa2.c +++ b/sound/oss/opl3sa2.c @@ -530,7 +530,7 @@ static void __init attach_opl3sa2_mss(struct address_info* hw_config, struct res if (hw_config->slots[0] != -1) { /* Did the MSS driver install? */ if(num_mixers == (initial_mixers + 1)) { - /* The MSS mixer is installed, reroute mixers appropiately */ + /* The MSS mixer is installed, reroute mixers appropriately */ AD1848_REROUTE(SOUND_MIXER_LINE1, SOUND_MIXER_CD); AD1848_REROUTE(SOUND_MIXER_LINE2, SOUND_MIXER_SYNTH); AD1848_REROUTE(SOUND_MIXER_LINE3, SOUND_MIXER_LINE); -- cgit v1.2.2 From 858119e159384308a5dde67776691a2ebf70df0f Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Sat, 14 Jan 2006 13:20:43 -0800 Subject: [PATCH] Unlinline a bunch of other functions Remove the "inline" keyword from a bunch of big functions in the kernel with the goal of shrinking it by 30kb to 40kb Signed-off-by: Arjan van de Ven Signed-off-by: Ingo Molnar Acked-by: Jeff Garzik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- sound/oss/esssolo1.c | 2 +- sound/pci/es1968.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sound') diff --git a/sound/oss/esssolo1.c b/sound/oss/esssolo1.c index a4ecab2f0522..849b59f67ef5 100644 --- a/sound/oss/esssolo1.c +++ b/sound/oss/esssolo1.c @@ -515,7 +515,7 @@ static inline int prog_dmabuf_adc(struct solo1_state *s) return 0; } -static inline int prog_dmabuf_dac(struct solo1_state *s) +static int prog_dmabuf_dac(struct solo1_state *s) { unsigned long va; int c; diff --git a/sound/pci/es1968.c b/sound/pci/es1968.c index 9ffb600321cb..3747a436f0cd 100644 --- a/sound/pci/es1968.c +++ b/sound/pci/es1968.c @@ -727,7 +727,7 @@ static void __apu_set_register(struct es1968 *chip, u16 channel, u8 reg, u16 dat apu_data_set(chip, data); } -static inline void apu_set_register(struct es1968 *chip, u16 channel, u8 reg, u16 data) +static void apu_set_register(struct es1968 *chip, u16 channel, u8 reg, u16 data) { unsigned long flags; spin_lock_irqsave(&chip->reg_lock, flags); @@ -743,7 +743,7 @@ static u16 __apu_get_register(struct es1968 *chip, u16 channel, u8 reg) return __maestro_read(chip, IDR0_DATA_PORT); } -static inline u16 apu_get_register(struct es1968 *chip, u16 channel, u8 reg) +static u16 apu_get_register(struct es1968 *chip, u16 channel, u8 reg) { unsigned long flags; u16 v; -- cgit v1.2.2 From 4f3f2f6f3e7ce68c533e7786114f05181772ff6f Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Tue, 17 Jan 2006 15:55:58 -0800 Subject: [SOUND]: sparc/cs4231: Fix some typos which wrecked the build. Signed-off-by: David S. Miller --- sound/sparc/cs4231.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c index e9086e95a31f..fd6543998788 100644 --- a/sound/sparc/cs4231.c +++ b/sound/sparc/cs4231.c @@ -69,13 +69,14 @@ struct sbus_dma_info { }; #endif +struct snd_cs4231; struct cs4231_dma_control { void (*prepare)(struct cs4231_dma_control *dma_cont, int dir); void (*enable)(struct cs4231_dma_control *dma_cont, int on); int (*request)(struct cs4231_dma_control *dma_cont, dma_addr_t bus_addr, size_t len); unsigned int (*address)(struct cs4231_dma_control *dma_cont); void (*reset)(struct snd_cs4231 *chip); - void (*preallocate)(struct snd_cs4231 *chip, struct snd_snd_pcm *pcm); + void (*preallocate)(struct snd_cs4231 *chip, struct snd_pcm *pcm); #ifdef EBUS_SUPPORT struct ebus_dma_info ebus_info; #endif -- cgit v1.2.2 From c2aeacd48ca2418fbac985a58d2200c263444d65 Mon Sep 17 00:00:00 2001 From: Jon Mason Date: Wed, 18 Jan 2006 17:42:25 -0800 Subject: [PATCH] Prevent trident driver from grabbing pcnet32 hardware Some pcnet32 hardware erroneously has the Vendor ID for Trident. The pcnet32 driver looks for the PCI ethernet class before grabbing the hardware, but the current trident driver does not check against the PCI audio class. This allows the trident driver to claim the pcnet32 hardware. This patch prevents that. This revised version of the OSS Trident patch includes PCI_DEVICE Macro usage. Signed-off-by: Jon Mason Signed-off-by: Muli Ben-Yehuda Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- sound/oss/trident.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'sound') diff --git a/sound/oss/trident.c b/sound/oss/trident.c index 5f0ad6bb43b9..a21c663e7e12 100644 --- a/sound/oss/trident.c +++ b/sound/oss/trident.c @@ -278,16 +278,14 @@ static char *card_names[] = { }; static struct pci_device_id trident_pci_tbl[] = { - {PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_DX, - PCI_ANY_ID, PCI_ANY_ID, 0, 0, TRIDENT_4D_DX}, - {PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_NX, - PCI_ANY_ID, PCI_ANY_ID, 0, 0, TRIDENT_4D_NX}, - {PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_7018, - PCI_ANY_ID, PCI_ANY_ID, 0, 0, SIS_7018}, - {PCI_VENDOR_ID_ALI, PCI_DEVICE_ID_ALI_5451, - PCI_ANY_ID, PCI_ANY_ID, 0, 0, ALI_5451}, - {PCI_VENDOR_ID_INTERG, PCI_DEVICE_ID_INTERG_5050, - PCI_ANY_ID, PCI_ANY_ID, 0, 0, CYBER5050}, + {PCI_DEVICE(PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_DX), + PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, TRIDENT_4D_DX}, + {PCI_DEVICE(PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_NX), + 0, 0, TRIDENT_4D_NX}, + {PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_7018), 0, 0, SIS_7018}, + {PCI_DEVICE(PCI_VENDOR_ID_ALI, PCI_DEVICE_ID_ALI_5451), 0, 0, ALI_5451}, + {PCI_DEVICE(PCI_VENDOR_ID_INTERG, PCI_DEVICE_ID_INTERG_5050), + 0, 0, CYBER5050}, {0,} }; -- cgit v1.2.2