All of lore.kernel.org
 help / color / mirror / Atom feed
From: helgaas@ldl.fc.hp.com
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Jaroslav Kysela <perex@suse.cz>, Adam Belay <ambx1@neo.rr.com>,
	linux-acpi@vger.kernel.org
Subject: [patch 06/17] PNP: Lindent quirks.c
Date: Mon, 23 Jul 2007 15:28:03 -0600	[thread overview]
Message-ID: <20070723213241.545252561@ldl.fc.hp.com> (raw)
In-Reply-To: 20070723212757.122218147@ldl.fc.hp.com

[-- Attachment #1: pnp-format-quirks --]
[-- Type: text/plain, Size: 5881 bytes --]

Run through Lindent, no functional change.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>

Index: work2/drivers/pnp/quirks.c
===================================================================
--- work2.orig/drivers/pnp/quirks.c	2007-07-20 15:47:30.000000000 -0600
+++ work2/drivers/pnp/quirks.c	2007-07-20 15:48:12.000000000 -0600
@@ -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 @@
 	 * 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 @@
 	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 @@
 {
 	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,24 +87,24 @@
 	 * 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");
-	return;
+	if (changed)
+		printk(KERN_INFO
+		       "pnp: SB audio device quirk - increasing port range\n");
 }
 
 static int quirk_smc_fir_enabled(struct pnp_dev *dev)
@@ -124,7 +124,7 @@
 	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 +153,8 @@
 	 */
 	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 +162,8 @@
 	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 +175,8 @@
 	 */
 	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 +200,8 @@
 
 	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 +209,6 @@
 		"email bjorn.helgaas@hp.com\n");
 }
 
-
 /*
  *  PnP Quirks
  *  Cards or devices that need some tweaking due to incomplete resource info
@@ -217,21 +216,21 @@
 
 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 +238,8 @@
 	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++;

--

  parent reply	other threads:[~2007-07-23 21:33 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-23 21:27 [patch 00/17] PNP Lindent helgaas
2007-07-23 21:27 ` [patch 01/17] PNP: Lindent card.c helgaas
2007-07-23 21:27 ` [patch 02/17] PNP: Lindent core.c helgaas
2007-07-23 21:28 ` [patch 03/17] PNP: Lindent driver.c helgaas
2007-07-23 21:28 ` [patch 04/17] PNP: Lindent interface.c helgaas
2007-07-23 21:28 ` [patch 05/17] PNP: Lindent manager.c helgaas
2007-07-23 21:28 ` helgaas [this message]
2007-07-23 21:28 ` [patch 07/17] PNP: Lindent resource.c helgaas
2007-07-23 21:28 ` [patch 08/17] PNP: Lindent support.c helgaas
2007-07-23 21:28 ` [patch 09/17] ISAPNP: Lindent core.c helgaas
2007-07-23 21:28 ` [patch 10/17] ISAPNP: Lindent proc.c helgaas
2007-07-23 21:28 ` [patch 11/17] PNPBIOS: remove unused bioscalls code helgaas
2007-07-23 21:28 ` [patch 12/17] PNPBIOS: Lindent bioscalls.c helgaas
2007-07-23 21:28 ` [patch 13/17] PNPBIOS: Lindent core.c helgaas
2007-07-23 21:28 ` [patch 14/17] PNPBIOS: Lindent proc.c helgaas
2007-07-23 21:28 ` [patch 15/17] PNPBIOS: Lindent rsparser.c helgaas
2007-07-23 21:28 ` [patch 16/17] PNPACPI: Lindent core.c helgaas
2007-07-23 21:28 ` [patch 17/17] PNPACPI: Lindent rsparser.c helgaas
2007-07-23 22:08 ` [patch 00/17] PNP Lindent Andrew Morton
2007-07-23 22:39   ` Bjorn Helgaas
2007-07-23 22:49     ` Andrew Morton
2007-07-23 22:53       ` Bjorn Helgaas
2007-07-23 23:00         ` Andrew Morton
2007-07-25 16:24           ` Len Brown
2007-07-25 16:57             ` Bjorn Helgaas
2007-07-25 21:53             ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070723213241.545252561@ldl.fc.hp.com \
    --to=helgaas@ldl.fc.hp.com \
    --cc=akpm@linux-foundation.org \
    --cc=ambx1@neo.rr.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=perex@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.