summaryrefslogtreecommitdiffstats
path: root/drivers/pnp/core.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2007-07-26 10:41:20 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-26 11:35:20 -0700
commit9dd78466c956ac4b4f38e12032dc4249ccf57ad1 (patch)
tree57ee3822b79049d38c1df952fe77e72a97c718f3 /drivers/pnp/core.c
parent8ec3cf7d29aef773eee5bc6cd9b0fa4d3fb42480 (diff)
downloadlinux-9dd78466c956ac4b4f38e12032dc4249ccf57ad1.tar.gz
linux-9dd78466c956ac4b4f38e12032dc4249ccf57ad1.tar.bz2
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/core.c')
-rw-r--r--drivers/pnp/core.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/drivers/pnp/core.c b/drivers/pnp/core.c
index 8e7b2dd38810..1dfdc325211d 100644
--- a/drivers/pnp/core.c
+++ b/drivers/pnp/core.c
@@ -18,7 +18,6 @@
#include "base.h"
-
static LIST_HEAD(pnp_protocols);
LIST_HEAD(pnp_global);
DEFINE_SPINLOCK(pnp_lock);
@@ -36,7 +35,7 @@ void *pnp_alloc(long size)
void *result;
result = kzalloc(size, GFP_KERNEL);
- if (!result){
+ if (!result) {
printk(KERN_ERR "pnp: Out of Memory\n");
return NULL;
}
@@ -53,7 +52,7 @@ void *pnp_alloc(long size)
int pnp_register_protocol(struct pnp_protocol *protocol)
{
int nodenum;
- struct list_head * pos;
+ struct list_head *pos;
if (!protocol)
return -EINVAL;
@@ -64,9 +63,9 @@ int pnp_register_protocol(struct pnp_protocol *protocol)
spin_lock(&pnp_lock);
/* assign the lowest unused number */
- list_for_each(pos,&pnp_protocols) {
- struct pnp_protocol * cur = to_pnp_protocol(pos);
- if (cur->number == nodenum){
+ list_for_each(pos, &pnp_protocols) {
+ struct pnp_protocol *cur = to_pnp_protocol(pos);
+ if (cur->number == nodenum) {
pos = &pnp_protocols;
nodenum++;
}
@@ -93,11 +92,10 @@ void pnp_unregister_protocol(struct pnp_protocol *protocol)
device_unregister(&protocol->dev);
}
-
static void pnp_free_ids(struct pnp_dev *dev)
{
- struct pnp_id * id;
- struct pnp_id * next;
+ struct pnp_id *id;
+ struct pnp_id *next;
if (!dev)
return;
id = dev->id;
@@ -110,7 +108,7 @@ static void pnp_free_ids(struct pnp_dev *dev)
static void pnp_release_device(struct device *dmdev)
{
- struct pnp_dev * dev = to_pnp_dev(dmdev);
+ struct pnp_dev *dev = to_pnp_dev(dmdev);
pnp_free_option(dev->independent);
pnp_free_option(dev->dependent);
pnp_free_ids(dev);
@@ -149,7 +147,8 @@ int pnp_add_device(struct pnp_dev *dev)
if (!dev || !dev->protocol || dev->card)
return -EINVAL;
dev->dev.parent = &dev->protocol->dev;
- sprintf(dev->dev.bus_id, "%02x:%02x", dev->protocol->number, dev->number);
+ sprintf(dev->dev.bus_id, "%02x:%02x", dev->protocol->number,
+ dev->number);
return __pnp_add_device(dev);
}
@@ -175,7 +174,7 @@ void pnp_remove_device(struct pnp_dev *dev)
return;
__pnp_remove_device(dev);
}
-#endif /* 0 */
+#endif /* 0 */
static int __init pnp_init(void)
{
@@ -190,4 +189,4 @@ EXPORT_SYMBOL(pnp_register_protocol);
EXPORT_SYMBOL(pnp_unregister_protocol);
EXPORT_SYMBOL(pnp_add_device);
EXPORT_SYMBOL(pnp_remove_device);
-#endif /* 0 */
+#endif /* 0 */