aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorgregkh@suse.de <gregkh@suse.de>2005-03-15 18:10:13 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-20 18:15:07 -0400
commit8561b10f6e7ef0a085709ffc844f74130a067abe (patch)
treeb25d023ce2d7397081735d20fd0c11ebdfcd603c /drivers/usb/host
parent1235686f6e67cf30c460eb77d90a6cb4be57b92f (diff)
[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 <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/ehci-dbg.c10
-rw-r--r--drivers/usb/host/ohci-dbg.c10
2 files changed, 10 insertions, 10 deletions
diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c
index 9b347d765383..2ff11d53567b 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)
450 450
451 *buf = 0; 451 *buf = 0;
452 452
453 bus = to_usb_bus(class_dev); 453 bus = class_get_devdata(class_dev);
454 hcd = bus->hcpriv; 454 hcd = bus->hcpriv;
455 ehci = hcd_to_ehci (hcd); 455 ehci = hcd_to_ehci (hcd);
456 next = buf; 456 next = buf;
@@ -496,7 +496,7 @@ show_periodic (struct class_device *class_dev, char *buf)
496 return 0; 496 return 0;
497 seen_count = 0; 497 seen_count = 0;
498 498
499 bus = to_usb_bus(class_dev); 499 bus = class_get_devdata(class_dev);
500 hcd = bus->hcpriv; 500 hcd = bus->hcpriv;
501 ehci = hcd_to_ehci (hcd); 501 ehci = hcd_to_ehci (hcd);
502 next = buf; 502 next = buf;
@@ -633,7 +633,7 @@ show_registers (struct class_device *class_dev, char *buf)
633 static char fmt [] = "%*s\n"; 633 static char fmt [] = "%*s\n";
634 static char label [] = ""; 634 static char label [] = "";
635 635
636 bus = to_usb_bus(class_dev); 636 bus = class_get_devdata(class_dev);
637 hcd = bus->hcpriv; 637 hcd = bus->hcpriv;
638 ehci = hcd_to_ehci (hcd); 638 ehci = hcd_to_ehci (hcd);
639 next = buf; 639 next = buf;
@@ -735,7 +735,7 @@ static CLASS_DEVICE_ATTR (registers, S_IRUGO, show_registers, NULL);
735 735
736static inline void create_debug_files (struct ehci_hcd *ehci) 736static inline void create_debug_files (struct ehci_hcd *ehci)
737{ 737{
738 struct class_device *cldev = &ehci_to_hcd(ehci)->self.class_dev; 738 struct class_device *cldev = ehci_to_hcd(ehci)->self.class_dev;
739 739
740 class_device_create_file(cldev, &class_device_attr_async); 740 class_device_create_file(cldev, &class_device_attr_async);
741 class_device_create_file(cldev, &class_device_attr_periodic); 741 class_device_create_file(cldev, &class_device_attr_periodic);
@@ -744,7 +744,7 @@ static inline void create_debug_files (struct ehci_hcd *ehci)
744 744
745static inline void remove_debug_files (struct ehci_hcd *ehci) 745static inline void remove_debug_files (struct ehci_hcd *ehci)
746{ 746{
747 struct class_device *cldev = &ehci_to_hcd(ehci)->self.class_dev; 747 struct class_device *cldev = ehci_to_hcd(ehci)->self.class_dev;
748 748
749 class_device_remove_file(cldev, &class_device_attr_async); 749 class_device_remove_file(cldev, &class_device_attr_async);
750 class_device_remove_file(cldev, &class_device_attr_periodic); 750 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 62f53a213808..c58408c95c3d 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)
481 size_t temp; 481 size_t temp;
482 unsigned long flags; 482 unsigned long flags;
483 483
484 bus = to_usb_bus(class_dev); 484 bus = class_get_devdata(class_dev);
485 hcd = bus->hcpriv; 485 hcd = bus->hcpriv;
486 ohci = hcd_to_ohci(hcd); 486 ohci = hcd_to_ohci(hcd);
487 487
@@ -514,7 +514,7 @@ show_periodic (struct class_device *class_dev, char *buf)
514 return 0; 514 return 0;
515 seen_count = 0; 515 seen_count = 0;
516 516
517 bus = to_usb_bus(class_dev); 517 bus = class_get_devdata(class_dev);
518 hcd = bus->hcpriv; 518 hcd = bus->hcpriv;
519 ohci = hcd_to_ohci(hcd); 519 ohci = hcd_to_ohci(hcd);
520 next = buf; 520 next = buf;
@@ -611,7 +611,7 @@ show_registers (struct class_device *class_dev, char *buf)
611 char *next; 611 char *next;
612 u32 rdata; 612 u32 rdata;
613 613
614 bus = to_usb_bus(class_dev); 614 bus = class_get_devdata(class_dev);
615 hcd = bus->hcpriv; 615 hcd = bus->hcpriv;
616 ohci = hcd_to_ohci(hcd); 616 ohci = hcd_to_ohci(hcd);
617 regs = ohci->regs; 617 regs = ohci->regs;
@@ -684,7 +684,7 @@ static CLASS_DEVICE_ATTR (registers, S_IRUGO, show_registers, NULL);
684 684
685static inline void create_debug_files (struct ohci_hcd *ohci) 685static inline void create_debug_files (struct ohci_hcd *ohci)
686{ 686{
687 struct class_device *cldev = &ohci_to_hcd(ohci)->self.class_dev; 687 struct class_device *cldev = ohci_to_hcd(ohci)->self.class_dev;
688 688
689 class_device_create_file(cldev, &class_device_attr_async); 689 class_device_create_file(cldev, &class_device_attr_async);
690 class_device_create_file(cldev, &class_device_attr_periodic); 690 class_device_create_file(cldev, &class_device_attr_periodic);
@@ -694,7 +694,7 @@ static inline void create_debug_files (struct ohci_hcd *ohci)
694 694
695static inline void remove_debug_files (struct ohci_hcd *ohci) 695static inline void remove_debug_files (struct ohci_hcd *ohci)
696{ 696{
697 struct class_device *cldev = &ohci_to_hcd(ohci)->self.class_dev; 697 struct class_device *cldev = ohci_to_hcd(ohci)->self.class_dev;
698 698
699 class_device_remove_file(cldev, &class_device_attr_async); 699 class_device_remove_file(cldev, &class_device_attr_async);
700 class_device_remove_file(cldev, &class_device_attr_periodic); 700 class_device_remove_file(cldev, &class_device_attr_periodic);