diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-04-27 16:17:21 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-06-16 00:44:43 -0400 |
commit | 820d7a253c5e59a786d5b608f6e8d0419fdc2f6e (patch) | |
tree | ad4c0a7eb64f3b42f84633e4beaea3b0f7cb6f48 | |
parent | ed14f0340a4954c1a9ffaff01c261428b5753e9d (diff) |
USB: remove unused usb_host class
The usb_host class isn't used for anything anymore (it was used for
debug files, but they have moved to debugfs a few kernel releases ago),
so let's delete it before someone accidentally puts a file in it.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/usb/core/hcd.c | 27 | ||||
-rw-r--r-- | drivers/usb/core/usb.c | 6 | ||||
-rw-r--r-- | drivers/usb/core/usb.h | 2 | ||||
-rw-r--r-- | include/linux/usb.h | 1 |
4 files changed, 0 insertions, 36 deletions
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 42b93da1085d..c65d95604028 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c | |||
@@ -755,23 +755,6 @@ static struct attribute_group usb_bus_attr_group = { | |||
755 | 755 | ||
756 | /*-------------------------------------------------------------------------*/ | 756 | /*-------------------------------------------------------------------------*/ |
757 | 757 | ||
758 | static struct class *usb_host_class; | ||
759 | |||
760 | int usb_host_init(void) | ||
761 | { | ||
762 | int retval = 0; | ||
763 | |||
764 | usb_host_class = class_create(THIS_MODULE, "usb_host"); | ||
765 | if (IS_ERR(usb_host_class)) | ||
766 | retval = PTR_ERR(usb_host_class); | ||
767 | return retval; | ||
768 | } | ||
769 | |||
770 | void usb_host_cleanup(void) | ||
771 | { | ||
772 | class_destroy(usb_host_class); | ||
773 | } | ||
774 | |||
775 | /** | 758 | /** |
776 | * usb_bus_init - shared initialization code | 759 | * usb_bus_init - shared initialization code |
777 | * @bus: the bus structure being initialized | 760 | * @bus: the bus structure being initialized |
@@ -818,12 +801,6 @@ static int usb_register_bus(struct usb_bus *bus) | |||
818 | set_bit (busnum, busmap.busmap); | 801 | set_bit (busnum, busmap.busmap); |
819 | bus->busnum = busnum; | 802 | bus->busnum = busnum; |
820 | 803 | ||
821 | bus->dev = device_create(usb_host_class, bus->controller, MKDEV(0, 0), | ||
822 | bus, "usb_host%d", busnum); | ||
823 | result = PTR_ERR(bus->dev); | ||
824 | if (IS_ERR(bus->dev)) | ||
825 | goto error_create_class_dev; | ||
826 | |||
827 | /* Add it to the local list of buses */ | 804 | /* Add it to the local list of buses */ |
828 | list_add (&bus->bus_list, &usb_bus_list); | 805 | list_add (&bus->bus_list, &usb_bus_list); |
829 | mutex_unlock(&usb_bus_list_lock); | 806 | mutex_unlock(&usb_bus_list_lock); |
@@ -834,8 +811,6 @@ static int usb_register_bus(struct usb_bus *bus) | |||
834 | "number %d\n", bus->busnum); | 811 | "number %d\n", bus->busnum); |
835 | return 0; | 812 | return 0; |
836 | 813 | ||
837 | error_create_class_dev: | ||
838 | clear_bit(busnum, busmap.busmap); | ||
839 | error_find_busnum: | 814 | error_find_busnum: |
840 | mutex_unlock(&usb_bus_list_lock); | 815 | mutex_unlock(&usb_bus_list_lock); |
841 | return result; | 816 | return result; |
@@ -865,8 +840,6 @@ static void usb_deregister_bus (struct usb_bus *bus) | |||
865 | usb_notify_remove_bus(bus); | 840 | usb_notify_remove_bus(bus); |
866 | 841 | ||
867 | clear_bit (bus->busnum, busmap.busmap); | 842 | clear_bit (bus->busnum, busmap.busmap); |
868 | |||
869 | device_unregister(bus->dev); | ||
870 | } | 843 | } |
871 | 844 | ||
872 | /** | 845 | /** |
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index c71590666ade..eb810bbe7bbc 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c | |||
@@ -1055,9 +1055,6 @@ static int __init usb_init(void) | |||
1055 | retval = bus_register_notifier(&usb_bus_type, &usb_bus_nb); | 1055 | retval = bus_register_notifier(&usb_bus_type, &usb_bus_nb); |
1056 | if (retval) | 1056 | if (retval) |
1057 | goto bus_notifier_failed; | 1057 | goto bus_notifier_failed; |
1058 | retval = usb_host_init(); | ||
1059 | if (retval) | ||
1060 | goto host_init_failed; | ||
1061 | retval = usb_major_init(); | 1058 | retval = usb_major_init(); |
1062 | if (retval) | 1059 | if (retval) |
1063 | goto major_init_failed; | 1060 | goto major_init_failed; |
@@ -1087,8 +1084,6 @@ usb_devio_init_failed: | |||
1087 | driver_register_failed: | 1084 | driver_register_failed: |
1088 | usb_major_cleanup(); | 1085 | usb_major_cleanup(); |
1089 | major_init_failed: | 1086 | major_init_failed: |
1090 | usb_host_cleanup(); | ||
1091 | host_init_failed: | ||
1092 | bus_unregister_notifier(&usb_bus_type, &usb_bus_nb); | 1087 | bus_unregister_notifier(&usb_bus_type, &usb_bus_nb); |
1093 | bus_notifier_failed: | 1088 | bus_notifier_failed: |
1094 | bus_unregister(&usb_bus_type); | 1089 | bus_unregister(&usb_bus_type); |
@@ -1113,7 +1108,6 @@ static void __exit usb_exit(void) | |||
1113 | usb_deregister(&usbfs_driver); | 1108 | usb_deregister(&usbfs_driver); |
1114 | usb_devio_cleanup(); | 1109 | usb_devio_cleanup(); |
1115 | usb_hub_cleanup(); | 1110 | usb_hub_cleanup(); |
1116 | usb_host_cleanup(); | ||
1117 | bus_unregister_notifier(&usb_bus_type, &usb_bus_nb); | 1111 | bus_unregister_notifier(&usb_bus_type, &usb_bus_nb); |
1118 | bus_unregister(&usb_bus_type); | 1112 | bus_unregister(&usb_bus_type); |
1119 | ksuspend_usb_cleanup(); | 1113 | ksuspend_usb_cleanup(); |
diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h index 79d8a9ea559b..dabf9255a10e 100644 --- a/drivers/usb/core/usb.h +++ b/drivers/usb/core/usb.h | |||
@@ -41,8 +41,6 @@ extern int usb_hub_init(void); | |||
41 | extern void usb_hub_cleanup(void); | 41 | extern void usb_hub_cleanup(void); |
42 | extern int usb_major_init(void); | 42 | extern int usb_major_init(void); |
43 | extern void usb_major_cleanup(void); | 43 | extern void usb_major_cleanup(void); |
44 | extern int usb_host_init(void); | ||
45 | extern void usb_host_cleanup(void); | ||
46 | 44 | ||
47 | #ifdef CONFIG_PM | 45 | #ifdef CONFIG_PM |
48 | 46 | ||
diff --git a/include/linux/usb.h b/include/linux/usb.h index 29060dad81e6..606e0aa5bbe6 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -336,7 +336,6 @@ struct usb_bus { | |||
336 | #ifdef CONFIG_USB_DEVICEFS | 336 | #ifdef CONFIG_USB_DEVICEFS |
337 | struct dentry *usbfs_dentry; /* usbfs dentry entry for the bus */ | 337 | struct dentry *usbfs_dentry; /* usbfs dentry entry for the bus */ |
338 | #endif | 338 | #endif |
339 | struct device *dev; /* device for this bus */ | ||
340 | 339 | ||
341 | #if defined(CONFIG_USB_MON) || defined(CONFIG_USB_MON_MODULE) | 340 | #if defined(CONFIG_USB_MON) || defined(CONFIG_USB_MON_MODULE) |
342 | struct mon_bus *mon_bus; /* non-null when associated */ | 341 | struct mon_bus *mon_bus; /* non-null when associated */ |