Skip to contentSkip to conversation

PnP cleanups and resource changes - 2.5.44 (1/4)

PATCH In review Adam Belay 2 participants 2 messages Oct 23, 2002 – Oct 24, 2002

Subsystems (2)
lore
Share & tools
lore

Adam Belay

author
#0 lore raw

PATCH 1/1 PnP cleanups and resource changes - 2.5.44 (1/4)

This patch fixes a number of things pointed out by Arne Thomassen. Also it makes a few changes to the resource checking functions in that they now check to make sure that resources do not conflict within the same device instead of only other devices. Although it is rare for this to be a factor it's nice to be able to deal with such situations properly.

Applies against 2.5.44 with the pnp fix patch.

Thanks,
Adam

drivers/pnp/core.c +1 -4
diff -ur a/drivers/pnp/core.c b/drivers/pnp/core.c
@@ -82,7 +82,6 @@
 	list_del_init(&protocol->protocol_list);
 	spin_unlock(&pnp_lock);
 	device_unregister(&protocol->dev);
-	return;
 }
 
 /**
@@ -105,7 +104,6 @@
 		pnp_free_resources(dev->res);
 	pnp_free_ids(dev);
 	kfree(dev);
-	return;
 }
 
 /**
@@ -118,7 +116,7 @@
 int pnp_add_device(struct pnp_dev *dev)
 {
 	int error = 0;
-	if (!dev && !dev->protocol)
+	if (!dev || !dev->protocol)
 		return -EINVAL;
 	if (dev->card)
 		sprintf(dev->dev.bus_id, "%02x:%02x.%02x", dev->protocol->number,
@@ -158,7 +156,6 @@
 	list_del_init(&dev->global_list);
 	list_del_init(&dev->dev_list);
 	spin_unlock(&pnp_lock);
-	return;
 }
 
 static int __init pnp_init(void)
drivers/pnp/driver.c +1 -2
diff -ur a/drivers/pnp/driver.c b/drivers/pnp/driver.c
@@ -150,7 +150,7 @@
 
 int pnp_register_driver(struct pnp_driver *drv)
 {
-	int count = 0;
+	int count;
 	pnp_dbg("the driver '%s' has been registered", drv->name);
 
 	drv->driver.name = drv->name;
@@ -194,7 +194,6 @@
 		struct pnp_id *pnp_id = to_pnp_id(pos);
 		kfree(pnp_id);
 	}
-	return;
 }
 
 EXPORT_SYMBOL(pnp_register_driver);
drivers/pnp/isapnp/compat.c +0 -1
diff -ur a/drivers/pnp/isapnp/compat.c b/drivers/pnp/isapnp/compat.c
@@ -23,7 +23,6 @@
 			device & 0x0f,
 			(device >> 12) & 0x0f,
 			(device >> 8) & 0x0f);
-	return;
 }
 
 struct pnp_card *pnp_find_card(unsigned short vendor,
drivers/pnp/names.c +0 -1
diff -ur a/drivers/pnp/names.c b/drivers/pnp/names.c
@@ -37,7 +37,6 @@
 			return;
 		}
 	}
-	return;
 }
 
 #else
drivers/pnp/quirks.c +0 -1
diff -ur a/drivers/pnp/quirks.c b/drivers/pnp/quirks.c
@@ -164,6 +164,5 @@
 		}
 		i++;
 	}
-	return;
 }
 
drivers/pnp/resource.c +55 -17

191 lines not on this page · raw message

#1 lore raw
Quoted 7 lines · Adam Belay

This patch fixes a number of things pointed out by Arne Thomassen. Also it makes a few changes to the resource checking functions in that they now check to make sure that resources do not conflict within the same device instead of only other devices. Although it is rare for this to be a factor it's nice to be able to deal with such situations properly.

Applies against 2.5.44 with the pnp fix patch.

Thanks, I've taken this on, and the 3 others and added it to the previous bk tree to be queued to send to Linus when he gets back.

thanks again,

greg k-h