aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-dbg.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/ehci-dbg.c')
-rw-r--r--drivers/usb/host/ehci-dbg.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c
index c9cc4413198e..754a146cf828 100644
--- a/drivers/usb/host/ehci-dbg.c
+++ b/drivers/usb/host/ehci-dbg.c
@@ -442,7 +442,7 @@ done:
442} 442}
443 443
444static ssize_t 444static ssize_t
445show_async (struct class_device *class_dev, char *buf) 445show_async(struct device *dev, struct device_attribute *attr, char *buf)
446{ 446{
447 struct usb_bus *bus; 447 struct usb_bus *bus;
448 struct usb_hcd *hcd; 448 struct usb_hcd *hcd;
@@ -454,7 +454,7 @@ show_async (struct class_device *class_dev, char *buf)
454 454
455 *buf = 0; 455 *buf = 0;
456 456
457 bus = class_get_devdata(class_dev); 457 bus = dev_get_drvdata(dev);
458 hcd = bus_to_hcd(bus); 458 hcd = bus_to_hcd(bus);
459 ehci = hcd_to_ehci (hcd); 459 ehci = hcd_to_ehci (hcd);
460 next = buf; 460 next = buf;
@@ -479,12 +479,12 @@ show_async (struct class_device *class_dev, char *buf)
479 479
480 return strlen (buf); 480 return strlen (buf);
481} 481}
482static CLASS_DEVICE_ATTR (async, S_IRUGO, show_async, NULL); 482static DEVICE_ATTR(async, S_IRUGO, show_async, NULL);
483 483
484#define DBG_SCHED_LIMIT 64 484#define DBG_SCHED_LIMIT 64
485 485
486static ssize_t 486static ssize_t
487show_periodic (struct class_device *class_dev, char *buf) 487show_periodic(struct device *dev, struct device_attribute *attr, char *buf)
488{ 488{
489 struct usb_bus *bus; 489 struct usb_bus *bus;
490 struct usb_hcd *hcd; 490 struct usb_hcd *hcd;
@@ -500,7 +500,7 @@ show_periodic (struct class_device *class_dev, char *buf)
500 return 0; 500 return 0;
501 seen_count = 0; 501 seen_count = 0;
502 502
503 bus = class_get_devdata(class_dev); 503 bus = dev_get_drvdata(dev);
504 hcd = bus_to_hcd(bus); 504 hcd = bus_to_hcd(bus);
505 ehci = hcd_to_ehci (hcd); 505 ehci = hcd_to_ehci (hcd);
506 next = buf; 506 next = buf;
@@ -623,12 +623,12 @@ show_periodic (struct class_device *class_dev, char *buf)
623 623
624 return PAGE_SIZE - size; 624 return PAGE_SIZE - size;
625} 625}
626static CLASS_DEVICE_ATTR (periodic, S_IRUGO, show_periodic, NULL); 626static DEVICE_ATTR(periodic, S_IRUGO, show_periodic, NULL);
627 627
628#undef DBG_SCHED_LIMIT 628#undef DBG_SCHED_LIMIT
629 629
630static ssize_t 630static ssize_t
631show_registers (struct class_device *class_dev, char *buf) 631show_registers(struct device *dev, struct device_attribute *attr, char *buf)
632{ 632{
633 struct usb_bus *bus; 633 struct usb_bus *bus;
634 struct usb_hcd *hcd; 634 struct usb_hcd *hcd;
@@ -639,7 +639,7 @@ show_registers (struct class_device *class_dev, char *buf)
639 static char fmt [] = "%*s\n"; 639 static char fmt [] = "%*s\n";
640 static char label [] = ""; 640 static char label [] = "";
641 641
642 bus = class_get_devdata(class_dev); 642 bus = dev_get_drvdata(dev);
643 hcd = bus_to_hcd(bus); 643 hcd = bus_to_hcd(bus);
644 ehci = hcd_to_ehci (hcd); 644 ehci = hcd_to_ehci (hcd);
645 next = buf; 645 next = buf;
@@ -789,25 +789,25 @@ done:
789 789
790 return PAGE_SIZE - size; 790 return PAGE_SIZE - size;
791} 791}
792static CLASS_DEVICE_ATTR (registers, S_IRUGO, show_registers, NULL); 792static DEVICE_ATTR(registers, S_IRUGO, show_registers, NULL);
793 793
794static inline void create_debug_files (struct ehci_hcd *ehci) 794static inline void create_debug_files (struct ehci_hcd *ehci)
795{ 795{
796 struct class_device *cldev = ehci_to_hcd(ehci)->self.class_dev; 796 struct device *dev = ehci_to_hcd(ehci)->self.dev;
797 int retval; 797 int retval;
798 798
799 retval = class_device_create_file(cldev, &class_device_attr_async); 799 retval = device_create_file(dev, &dev_attr_async);
800 retval = class_device_create_file(cldev, &class_device_attr_periodic); 800 retval = device_create_file(dev, &dev_attr_periodic);
801 retval = class_device_create_file(cldev, &class_device_attr_registers); 801 retval = device_create_file(dev, &dev_attr_registers);
802} 802}
803 803
804static inline void remove_debug_files (struct ehci_hcd *ehci) 804static inline void remove_debug_files (struct ehci_hcd *ehci)
805{ 805{
806 struct class_device *cldev = ehci_to_hcd(ehci)->self.class_dev; 806 struct device *dev = ehci_to_hcd(ehci)->self.dev;
807 807
808 class_device_remove_file(cldev, &class_device_attr_async); 808 device_remove_file(dev, &dev_attr_async);
809 class_device_remove_file(cldev, &class_device_attr_periodic); 809 device_remove_file(dev, &dev_attr_periodic);
810 class_device_remove_file(cldev, &class_device_attr_registers); 810 device_remove_file(dev, &dev_attr_registers);
811} 811}
812 812
813#endif /* STUB_DEBUG_FILES */ 813#endif /* STUB_DEBUG_FILES */