aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp/system.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2007-07-26 13:41:20 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-26 14:35:20 -0400
commit9dd78466c956ac4b4f38e12032dc4249ccf57ad1 (patch)
tree57ee3822b79049d38c1df952fe77e72a97c718f3 /drivers/pnp/system.c
parent8ec3cf7d29aef773eee5bc6cd9b0fa4d3fb42480 (diff)
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/system.c')
-rw-r--r--drivers/pnp/system.c38
1 files changed, 20 insertions, 18 deletions
diff --git a/drivers/pnp/system.c b/drivers/pnp/system.c
index a8a95540b1ef..8d71008accba 100644
--- a/drivers/pnp/system.c
+++ b/drivers/pnp/system.c
@@ -16,13 +16,14 @@
16 16
17static const struct pnp_device_id pnp_dev_table[] = { 17static const struct pnp_device_id pnp_dev_table[] = {
18 /* General ID for reserving resources */ 18 /* General ID for reserving resources */
19 { "PNP0c02", 0 }, 19 {"PNP0c02", 0},
20 /* memory controller */ 20 /* memory controller */
21 { "PNP0c01", 0 }, 21 {"PNP0c01", 0},
22 { "", 0 } 22 {"", 0}
23}; 23};
24 24
25static void reserve_range(const char *pnpid, resource_size_t start, resource_size_t end, int port) 25static void reserve_range(const char *pnpid, resource_size_t start,
26 resource_size_t end, int port)
26{ 27{
27 struct resource *res; 28 struct resource *res;
28 char *regionid; 29 char *regionid;
@@ -32,9 +33,9 @@ static void reserve_range(const char *pnpid, resource_size_t start, resource_siz
32 return; 33 return;
33 snprintf(regionid, 16, "pnp %s", pnpid); 34 snprintf(regionid, 16, "pnp %s", pnpid);
34 if (port) 35 if (port)
35 res = request_region(start, end-start+1, regionid); 36 res = request_region(start, end - start + 1, regionid);
36 else 37 else
37 res = request_mem_region(start, end-start+1, regionid); 38 res = request_mem_region(start, end - start + 1, regionid);
38 if (res == NULL) 39 if (res == NULL)
39 kfree(regionid); 40 kfree(regionid);
40 else 41 else
@@ -45,10 +46,10 @@ static void reserve_range(const char *pnpid, resource_size_t start, resource_siz
45 * have double reservations. 46 * have double reservations.
46 */ 47 */
47 printk(KERN_INFO 48 printk(KERN_INFO
48 "pnp: %s: %s range 0x%llx-0x%llx %s reserved\n", 49 "pnp: %s: %s range 0x%llx-0x%llx %s reserved\n",
49 pnpid, port ? "ioport" : "iomem", 50 pnpid, port ? "ioport" : "iomem",
50 (unsigned long long)start, (unsigned long long)end, 51 (unsigned long long)start, (unsigned long long)end,
51 NULL != res ? "has been" : "could not be"); 52 NULL != res ? "has been" : "could not be");
52} 53}
53 54
54static void reserve_resources_of_dev(const struct pnp_dev *dev) 55static void reserve_resources_of_dev(const struct pnp_dev *dev)
@@ -74,7 +75,7 @@ static void reserve_resources_of_dev(const struct pnp_dev *dev)
74 continue; /* invalid */ 75 continue; /* invalid */
75 76
76 reserve_range(dev->dev.bus_id, pnp_port_start(dev, i), 77 reserve_range(dev->dev.bus_id, pnp_port_start(dev, i),
77 pnp_port_end(dev, i), 1); 78 pnp_port_end(dev, i), 1);
78 } 79 }
79 80
80 for (i = 0; i < PNP_MAX_MEM; i++) { 81 for (i = 0; i < PNP_MAX_MEM; i++) {
@@ -82,24 +83,25 @@ static void reserve_resources_of_dev(const struct pnp_dev *dev)
82 continue; 83 continue;
83 84
84 reserve_range(dev->dev.bus_id, pnp_mem_start(dev, i), 85 reserve_range(dev->dev.bus_id, pnp_mem_start(dev, i),
85 pnp_mem_end(dev, i), 0); 86 pnp_mem_end(dev, i), 0);
86 } 87 }
87 88
88 return; 89 return;
89} 90}
90 91
91static int system_pnp_probe(struct pnp_dev * dev, const struct pnp_device_id *dev_id) 92static int system_pnp_probe(struct pnp_dev *dev,
93 const struct pnp_device_id *dev_id)
92{ 94{
93 reserve_resources_of_dev(dev); 95 reserve_resources_of_dev(dev);
94 return 0; 96 return 0;
95} 97}
96 98
97static struct pnp_driver system_pnp_driver = { 99static struct pnp_driver system_pnp_driver = {
98 .name = "system", 100 .name = "system",
99 .id_table = pnp_dev_table, 101 .id_table = pnp_dev_table,
100 .flags = PNP_DRIVER_RES_DO_NOT_CHANGE, 102 .flags = PNP_DRIVER_RES_DO_NOT_CHANGE,
101 .probe = system_pnp_probe, 103 .probe = system_pnp_probe,
102 .remove = NULL, 104 .remove = NULL,
103}; 105};
104 106
105static int __init pnp_system_init(void) 107static int __init pnp_system_init(void)