From 9dd78466c956ac4b4f38e12032dc4249ccf57ad1 Mon Sep 17 00:00:00 2001 From: Bjorn Helgaas Date: Thu, 26 Jul 2007 10:41:20 -0700 Subject: 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 Cc: Len Brown Cc: Adam Belay Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/pnp/core.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'drivers/pnp/core.c') 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 */ -- cgit v1.2.3