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>
This commit is contained in:
Bjorn Helgaas
2007-07-26 10:41:20 -07:00
committed by Linus Torvalds
parent 8ec3cf7d29
commit 9dd78466c9
20 changed files with 1662 additions and 1312 deletions

View File

@@ -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 */