diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2007-07-26 19:41:20 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-26 20:35:20 +0200 |
commit | 9dd78466c956ac4b4f38e12032dc4249ccf57ad1 (patch) | |
tree | 57ee3822b79049d38c1df952fe77e72a97c718f3 /drivers/pnp/quirks.c | |
parent | x86_64: cleanup tsc.c merge artifact (diff) | |
download | linux-9dd78466c956ac4b4f38e12032dc4249ccf57ad1.tar.xz linux-9dd78466c956ac4b4f38e12032dc4249ccf57ad1.zip |
PNP: Lindent all source files
Run Lindent on all PNP source files.
Produced by:
$ quilt new pnp-lindent
$ find drivers/pnp -name \*.[ch] | xargs quilt add
$ quilt add include/linux/{pnp.h,pnpbios.h}
$ scripts/Lindent drivers/pnp/*.c drivers/pnp/*/*.c include/linux/pnp*.h
$ quilt refresh --sort
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Len Brown <lenb@kernel.org>
Cc: Adam Belay <ambx1@neo.rr.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/pnp/quirks.c')
-rw-r--r-- | drivers/pnp/quirks.c | 79 |
1 files changed, 39 insertions, 40 deletions
diff --git a/drivers/pnp/quirks.c b/drivers/pnp/quirks.c index 7c3236690cc3..8e7d7738f296 100644 --- a/drivers/pnp/quirks.c +++ b/drivers/pnp/quirks.c @@ -19,7 +19,6 @@ #include <linux/io.h> #include "base.h" - static void quirk_awe32_resources(struct pnp_dev *dev) { struct pnp_port *port, *port2, *port3; @@ -31,7 +30,7 @@ static void quirk_awe32_resources(struct pnp_dev *dev) * two extra ports (at offset 0x400 and 0x800 from the one given) by * hand. */ - for ( ; res ; res = res->next ) { + for (; res; res = res->next) { port2 = pnp_alloc(sizeof(struct pnp_port)); if (!port2) return; @@ -58,18 +57,19 @@ static void quirk_cmi8330_resources(struct pnp_dev *dev) struct pnp_option *res = dev->dependent; unsigned long tmp; - for ( ; res ; res = res->next ) { + for (; res; res = res->next) { struct pnp_irq *irq; struct pnp_dma *dma; - for( irq = res->irq; irq; irq = irq->next ) { // Valid irqs are 5, 7, 10 + for (irq = res->irq; irq; irq = irq->next) { // Valid irqs are 5, 7, 10 tmp = 0x04A0; bitmap_copy(irq->map, &tmp, 16); // 0000 0100 1010 0000 } - for( dma = res->dma; dma; dma = dma->next ) // Valid 8bit dma channels are 1,3 - if( ( dma->flags & IORESOURCE_DMA_TYPE_MASK ) == IORESOURCE_DMA_8BIT ) + for (dma = res->dma; dma; dma = dma->next) // Valid 8bit dma channels are 1,3 + if ((dma->flags & IORESOURCE_DMA_TYPE_MASK) == + IORESOURCE_DMA_8BIT) dma->map = 0x000A; } printk(KERN_INFO "pnp: CMI8330 quirk - fixing interrupts and dma\n"); @@ -79,7 +79,7 @@ static void quirk_sb16audio_resources(struct pnp_dev *dev) { struct pnp_port *port; struct pnp_option *res = dev->dependent; - int changed = 0; + int changed = 0; /* * The default range on the mpu port for these devices is 0x388-0x388. @@ -87,23 +87,24 @@ static void quirk_sb16audio_resources(struct pnp_dev *dev) * auto-configured. */ - for( ; res ; res = res->next ) { + for (; res; res = res->next) { port = res->port; - if(!port) + if (!port) continue; port = port->next; - if(!port) + if (!port) continue; port = port->next; - if(!port) + if (!port) continue; - if(port->min != port->max) + if (port->min != port->max) continue; port->max += 0x70; changed = 1; } - if(changed) - printk(KERN_INFO "pnp: SB audio device quirk - increasing port range\n"); + if (changed) + printk(KERN_INFO + "pnp: SB audio device quirk - increasing port range\n"); return; } @@ -124,7 +125,7 @@ static int quirk_smc_fir_enabled(struct pnp_dev *dev) outb(bank, firbase + 7); high = inb(firbase + 0); - low = inb(firbase + 1); + low = inb(firbase + 1); chip = inb(firbase + 2); /* This corresponds to the check in smsc_ircc_present() */ @@ -153,8 +154,8 @@ static void quirk_smc_enable(struct pnp_dev *dev) */ dev_err(&dev->dev, "%s not responding at SIR 0x%lx, FIR 0x%lx; " "auto-configuring\n", dev->id->id, - (unsigned long) pnp_port_start(dev, 0), - (unsigned long) pnp_port_start(dev, 1)); + (unsigned long)pnp_port_start(dev, 0), + (unsigned long)pnp_port_start(dev, 1)); pnp_disable_dev(dev); pnp_init_resource_table(&dev->res); @@ -162,8 +163,8 @@ static void quirk_smc_enable(struct pnp_dev *dev) pnp_activate_dev(dev); if (quirk_smc_fir_enabled(dev)) { dev_err(&dev->dev, "responds at SIR 0x%lx, FIR 0x%lx\n", - (unsigned long) pnp_port_start(dev, 0), - (unsigned long) pnp_port_start(dev, 1)); + (unsigned long)pnp_port_start(dev, 0), + (unsigned long)pnp_port_start(dev, 1)); return; } @@ -175,8 +176,8 @@ static void quirk_smc_enable(struct pnp_dev *dev) */ dev_err(&dev->dev, "not responding at SIR 0x%lx, FIR 0x%lx; " "swapping SIR/FIR and reconfiguring\n", - (unsigned long) pnp_port_start(dev, 0), - (unsigned long) pnp_port_start(dev, 1)); + (unsigned long)pnp_port_start(dev, 0), + (unsigned long)pnp_port_start(dev, 1)); /* * Clear IORESOURCE_AUTO so pnp_activate_dev() doesn't reassign @@ -200,8 +201,8 @@ static void quirk_smc_enable(struct pnp_dev *dev) if (quirk_smc_fir_enabled(dev)) { dev_err(&dev->dev, "responds at SIR 0x%lx, FIR 0x%lx\n", - (unsigned long) pnp_port_start(dev, 0), - (unsigned long) pnp_port_start(dev, 1)); + (unsigned long)pnp_port_start(dev, 0), + (unsigned long)pnp_port_start(dev, 1)); return; } @@ -209,7 +210,6 @@ static void quirk_smc_enable(struct pnp_dev *dev) "email bjorn.helgaas@hp.com\n"); } - /* * PnP Quirks * Cards or devices that need some tweaking due to incomplete resource info @@ -217,21 +217,21 @@ static void quirk_smc_enable(struct pnp_dev *dev) static struct pnp_fixup pnp_fixups[] = { /* Soundblaster awe io port quirk */ - { "CTL0021", quirk_awe32_resources }, - { "CTL0022", quirk_awe32_resources }, - { "CTL0023", quirk_awe32_resources }, + {"CTL0021", quirk_awe32_resources}, + {"CTL0022", quirk_awe32_resources}, + {"CTL0023", quirk_awe32_resources}, /* CMI 8330 interrupt and dma fix */ - { "@X@0001", quirk_cmi8330_resources }, + {"@X@0001", quirk_cmi8330_resources}, /* Soundblaster audio device io port range quirk */ - { "CTL0001", quirk_sb16audio_resources }, - { "CTL0031", quirk_sb16audio_resources }, - { "CTL0041", quirk_sb16audio_resources }, - { "CTL0042", quirk_sb16audio_resources }, - { "CTL0043", quirk_sb16audio_resources }, - { "CTL0044", quirk_sb16audio_resources }, - { "CTL0045", quirk_sb16audio_resources }, - { "SMCf010", quirk_smc_enable }, - { "" } + {"CTL0001", quirk_sb16audio_resources}, + {"CTL0031", quirk_sb16audio_resources}, + {"CTL0041", quirk_sb16audio_resources}, + {"CTL0042", quirk_sb16audio_resources}, + {"CTL0043", quirk_sb16audio_resources}, + {"CTL0044", quirk_sb16audio_resources}, + {"CTL0045", quirk_sb16audio_resources}, + {"SMCf010", quirk_smc_enable}, + {""} }; void pnp_fixup_device(struct pnp_dev *dev) @@ -239,9 +239,8 @@ void pnp_fixup_device(struct pnp_dev *dev) int i = 0; while (*pnp_fixups[i].id) { - if (compare_pnp_id(dev->id,pnp_fixups[i].id)) { - pnp_dbg("Calling quirk for %s", - dev->dev.bus_id); + if (compare_pnp_id(dev->id, pnp_fixups[i].id)) { + pnp_dbg("Calling quirk for %s", dev->dev.bus_id); pnp_fixups[i].quirk_function(dev); } i++; |