From 07d4e9af109221ab731c5aaf832e89776c64b013 Mon Sep 17 00:00:00 2001 From: Bjorn Helgaas Date: Thu, 26 Jul 2007 10:41:21 -0700 Subject: PNP: fix up after Lindent These are manual fixups after running Lindent. No functional change. 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 | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) (limited to 'drivers/pnp/core.c') diff --git a/drivers/pnp/core.c b/drivers/pnp/core.c index 1dfdc325211..61066fdb9e6 100644 --- a/drivers/pnp/core.c +++ b/drivers/pnp/core.c @@ -2,7 +2,6 @@ * core.c - contains all core device and protocol registration functions * * Copyright 2002 Adam Belay - * */ #include @@ -48,7 +47,6 @@ void *pnp_alloc(long size) * * Ex protocols: ISAPNP, PNPBIOS, etc */ - int pnp_register_protocol(struct pnp_protocol *protocol) { int nodenum; @@ -82,7 +80,6 @@ int pnp_register_protocol(struct pnp_protocol *protocol) /** * pnp_protocol_unregister - removes a pnp protocol from the pnp layer * @protocol: pointer to the corresponding pnp_protocol structure - * */ void pnp_unregister_protocol(struct pnp_protocol *protocol) { @@ -96,6 +93,7 @@ static void pnp_free_ids(struct pnp_dev *dev) { struct pnp_id *id; struct pnp_id *next; + if (!dev) return; id = dev->id; @@ -109,6 +107,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); + pnp_free_option(dev->independent); pnp_free_option(dev->dependent); pnp_free_ids(dev); @@ -118,6 +117,7 @@ static void pnp_release_device(struct device *dmdev) int __pnp_add_device(struct pnp_dev *dev) { int ret; + pnp_fixup_device(dev); dev->dev.bus = &pnp_bus_type; dev->dev.dma_mask = &dev->dma_mask; @@ -141,7 +141,6 @@ int __pnp_add_device(struct pnp_dev *dev) * * adds to driver model, name database, fixups, interface, etc. */ - int pnp_add_device(struct pnp_dev *dev) { if (!dev || !dev->protocol || dev->card) @@ -161,21 +160,6 @@ void __pnp_remove_device(struct pnp_dev *dev) device_unregister(&dev->dev); } -/** - * pnp_remove_device - removes a pnp device from the pnp layer - * @dev: pointer to dev to add - * - * this function will free all mem used by dev - */ -#if 0 -void pnp_remove_device(struct pnp_dev *dev) -{ - if (!dev || dev->card) - return; - __pnp_remove_device(dev); -} -#endif /* 0 */ - static int __init pnp_init(void) { printk(KERN_INFO "Linux Plug and Play Support v0.97 (c) Adam Belay\n"); @@ -183,10 +167,3 @@ static int __init pnp_init(void) } subsys_initcall(pnp_init); - -#if 0 -EXPORT_SYMBOL(pnp_register_protocol); -EXPORT_SYMBOL(pnp_unregister_protocol); -EXPORT_SYMBOL(pnp_add_device); -EXPORT_SYMBOL(pnp_remove_device); -#endif /* 0 */ -- cgit