From 8561b10f6e7ef0a085709ffc844f74130a067abe Mon Sep 17 00:00:00 2001 From: "gregkh@suse.de" Date: Tue, 15 Mar 2005 15:10:13 -0800 Subject: [PATCH] USB: move the usb hcd code to use the new class code. This moves a kref into the main hcd structure, which detaches it from the class device structure. Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/ehci-dbg.c | 10 +++++----- drivers/usb/host/ohci-dbg.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'drivers/usb/host') diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c index 9b347d7..2ff11d5 100644 --- a/drivers/usb/host/ehci-dbg.c +++ b/drivers/usb/host/ehci-dbg.c @@ -450,7 +450,7 @@ show_async (struct class_device *class_dev, char *buf) *buf = 0; - bus = to_usb_bus(class_dev); + bus = class_get_devdata(class_dev); hcd = bus->hcpriv; ehci = hcd_to_ehci (hcd); next = buf; @@ -496,7 +496,7 @@ show_periodic (struct class_device *class_dev, char *buf) return 0; seen_count = 0; - bus = to_usb_bus(class_dev); + bus = class_get_devdata(class_dev); hcd = bus->hcpriv; ehci = hcd_to_ehci (hcd); next = buf; @@ -633,7 +633,7 @@ show_registers (struct class_device *class_dev, char *buf) static char fmt [] = "%*s\n"; static char label [] = ""; - bus = to_usb_bus(class_dev); + bus = class_get_devdata(class_dev); hcd = bus->hcpriv; ehci = hcd_to_ehci (hcd); next = buf; @@ -735,7 +735,7 @@ static CLASS_DEVICE_ATTR (registers, S_IRUGO, show_registers, NULL); static inline void create_debug_files (struct ehci_hcd *ehci) { - struct class_device *cldev = &ehci_to_hcd(ehci)->self.class_dev; + struct class_device *cldev = ehci_to_hcd(ehci)->self.class_dev; class_device_create_file(cldev, &class_device_attr_async); class_device_create_file(cldev, &class_device_attr_periodic); @@ -744,7 +744,7 @@ static inline void create_debug_files (struct ehci_hcd *ehci) static inline void remove_debug_files (struct ehci_hcd *ehci) { - struct class_device *cldev = &ehci_to_hcd(ehci)->self.class_dev; + struct class_device *cldev = ehci_to_hcd(ehci)->self.class_dev; class_device_remove_file(cldev, &class_device_attr_async); class_device_remove_file(cldev, &class_device_attr_periodic); diff --git a/drivers/usb/host/ohci-dbg.c b/drivers/usb/host/ohci-dbg.c index 62f53a2..c58408c 100644 --- a/drivers/usb/host/ohci-dbg.c +++ b/drivers/usb/host/ohci-dbg.c @@ -481,7 +481,7 @@ show_async (struct class_device *class_dev, char *buf) size_t temp; unsigned long flags; - bus = to_usb_bus(class_dev); + bus = class_get_devdata(class_dev); hcd = bus->hcpriv; ohci = hcd_to_ohci(hcd); @@ -514,7 +514,7 @@ show_periodic (struct class_device *class_dev, char *buf) return 0; seen_count = 0; - bus = to_usb_bus(class_dev); + bus = class_get_devdata(class_dev); hcd = bus->hcpriv; ohci = hcd_to_ohci(hcd); next = buf; @@ -611,7 +611,7 @@ show_registers (struct class_device *class_dev, char *buf) char *next; u32 rdata; - bus = to_usb_bus(class_dev); + bus = class_get_devdata(class_dev); hcd = bus->hcpriv; ohci = hcd_to_ohci(hcd); regs = ohci->regs; @@ -684,7 +684,7 @@ static CLASS_DEVICE_ATTR (registers, S_IRUGO, show_registers, NULL); static inline void create_debug_files (struct ohci_hcd *ohci) { - struct class_device *cldev = &ohci_to_hcd(ohci)->self.class_dev; + struct class_device *cldev = ohci_to_hcd(ohci)->self.class_dev; class_device_create_file(cldev, &class_device_attr_async); class_device_create_file(cldev, &class_device_attr_periodic); @@ -694,7 +694,7 @@ static inline void create_debug_files (struct ohci_hcd *ohci) static inline void remove_debug_files (struct ohci_hcd *ohci) { - struct class_device *cldev = &ohci_to_hcd(ohci)->self.class_dev; + struct class_device *cldev = ohci_to_hcd(ohci)->self.class_dev; class_device_remove_file(cldev, &class_device_attr_async); class_device_remove_file(cldev, &class_device_attr_periodic); -- cgit v1.1