aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2009-04-27 16:17:21 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-06-16 00:44:43 -0400
commit820d7a253c5e59a786d5b608f6e8d0419fdc2f6e (patch)
treead4c0a7eb64f3b42f84633e4beaea3b0f7cb6f48
parented14f0340a4954c1a9ffaff01c261428b5753e9d (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.c27
-rw-r--r--drivers/usb/core/usb.c6
-rw-r--r--drivers/usb/core/usb.h2
-rw-r--r--include/linux/usb.h1
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
758static struct class *usb_host_class;
759
760int 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
770void 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
837error_create_class_dev:
838 clear_bit(busnum, busmap.busmap);
839error_find_busnum: 814error_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:
1087driver_register_failed: 1084driver_register_failed:
1088 usb_major_cleanup(); 1085 usb_major_cleanup();
1089major_init_failed: 1086major_init_failed:
1090 usb_host_cleanup();
1091host_init_failed:
1092 bus_unregister_notifier(&usb_bus_type, &usb_bus_nb); 1087 bus_unregister_notifier(&usb_bus_type, &usb_bus_nb);
1093bus_notifier_failed: 1088bus_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);
41extern void usb_hub_cleanup(void); 41extern void usb_hub_cleanup(void);
42extern int usb_major_init(void); 42extern int usb_major_init(void);
43extern void usb_major_cleanup(void); 43extern void usb_major_cleanup(void);
44extern int usb_host_init(void);
45extern 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 */