From foo@baz Tue Apr 9 12:12:43 2002 To: Greg KH Date: 24 Mar 2005 10:48:35 -08:00 From: mochel@digitalimplant.org Subject: [driver core] Remove the unused device_find(). Signed-off-by: Patrick Mochel Signed-off-by: Greg Kroah-Hartman Index: linux-2.6.12-rc2/drivers/base/core.c =================================================================== --- linux-2.6.12-rc2.orig/drivers/base/core.c 2005-04-05 14:35:02.000000000 -0700 +++ linux-2.6.12-rc2/drivers/base/core.c 2005-04-05 14:35:03.000000000 -0700 @@ -404,24 +404,6 @@ return error; } -/** - * device_find - locate device on a bus by name. - * @name: name of the device. - * @bus: bus to scan for the device. - * - * Call kset_find_obj() to iterate over list of devices on - * a bus to find device by name. Return device if found. - * - * Note that kset_find_obj increments device's reference count. - */ -struct device *device_find(const char *name, struct bus_type *bus) -{ - struct kobject *k = kset_find_obj(&bus->devices, name); - if (k) - return to_dev(k); - return NULL; -} - int __init devices_init(void) { return subsystem_register(&devices_subsys); @@ -437,7 +419,6 @@ EXPORT_SYMBOL_GPL(device_unregister); EXPORT_SYMBOL_GPL(get_device); EXPORT_SYMBOL_GPL(put_device); -EXPORT_SYMBOL_GPL(device_find); EXPORT_SYMBOL_GPL(device_create_file); EXPORT_SYMBOL_GPL(device_remove_file); Index: linux-2.6.12-rc2/include/linux/device.h =================================================================== --- linux-2.6.12-rc2.orig/include/linux/device.h 2005-04-05 14:35:02.000000000 -0700 +++ linux-2.6.12-rc2/include/linux/device.h 2005-04-05 14:35:03.000000000 -0700 @@ -375,7 +375,6 @@ */ extern struct device * get_device(struct device * dev); extern void put_device(struct device * dev); -extern struct device *device_find(const char *name, struct bus_type *bus); /* drivers/base/platform.c */