aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci-dbg.c
diff options
context:
space:
mode:
authorTony Jones <tonyj@suse.de>2007-09-11 17:07:31 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-02-01 17:34:46 -0500
commit5a3201b2809a9f7bcda8413c445483f5b5e490a3 (patch)
tree3be21f9b9a8fa953645b889bbf31c3b8ec6f19a0 /drivers/usb/host/ohci-dbg.c
parentde6f92b9ee00e9f841fb1a63d0bd60593ec55dbe (diff)
USB: Convert from class_device to device for USB core
Convert from class_device to device for drivers/usb/core. Signed-off-by: Tony Jones <tonyj@suse.de> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ohci-dbg.c')
-rw-r--r--drivers/usb/host/ohci-dbg.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/usb/host/ohci-dbg.c b/drivers/usb/host/ohci-dbg.c
index ebab5ce8f5ce..9bd589806245 100644
--- a/drivers/usb/host/ohci-dbg.c
+++ b/drivers/usb/host/ohci-dbg.c
@@ -468,7 +468,7 @@ show_list (struct ohci_hcd *ohci, char *buf, size_t count, struct ed *ed)
468} 468}
469 469
470static ssize_t 470static ssize_t
471show_async (struct class_device *class_dev, char *buf) 471show_async(struct device *dev, struct device_attribute *attr, char *buf)
472{ 472{
473 struct usb_bus *bus; 473 struct usb_bus *bus;
474 struct usb_hcd *hcd; 474 struct usb_hcd *hcd;
@@ -476,7 +476,7 @@ show_async (struct class_device *class_dev, char *buf)
476 size_t temp; 476 size_t temp;
477 unsigned long flags; 477 unsigned long flags;
478 478
479 bus = class_get_devdata(class_dev); 479 bus = dev_get_drvdata(dev);
480 hcd = bus_to_hcd(bus); 480 hcd = bus_to_hcd(bus);
481 ohci = hcd_to_ohci(hcd); 481 ohci = hcd_to_ohci(hcd);
482 482
@@ -488,13 +488,13 @@ show_async (struct class_device *class_dev, char *buf)
488 488
489 return temp; 489 return temp;
490} 490}
491static CLASS_DEVICE_ATTR (async, S_IRUGO, show_async, NULL); 491static DEVICE_ATTR(async, S_IRUGO, show_async, NULL);
492 492
493 493
494#define DBG_SCHED_LIMIT 64 494#define DBG_SCHED_LIMIT 64
495 495
496static ssize_t 496static ssize_t
497show_periodic (struct class_device *class_dev, char *buf) 497show_periodic(struct device *dev, struct device_attribute *attr, char *buf)
498{ 498{
499 struct usb_bus *bus; 499 struct usb_bus *bus;
500 struct usb_hcd *hcd; 500 struct usb_hcd *hcd;
@@ -509,7 +509,7 @@ show_periodic (struct class_device *class_dev, char *buf)
509 return 0; 509 return 0;
510 seen_count = 0; 510 seen_count = 0;
511 511
512 bus = class_get_devdata(class_dev); 512 bus = dev_get_drvdata(dev);
513 hcd = bus_to_hcd(bus); 513 hcd = bus_to_hcd(bus);
514 ohci = hcd_to_ohci(hcd); 514 ohci = hcd_to_ohci(hcd);
515 next = buf; 515 next = buf;
@@ -589,13 +589,13 @@ show_periodic (struct class_device *class_dev, char *buf)
589 589
590 return PAGE_SIZE - size; 590 return PAGE_SIZE - size;
591} 591}
592static CLASS_DEVICE_ATTR (periodic, S_IRUGO, show_periodic, NULL); 592static DEVICE_ATTR(periodic, S_IRUGO, show_periodic, NULL);
593 593
594 594
595#undef DBG_SCHED_LIMIT 595#undef DBG_SCHED_LIMIT
596 596
597static ssize_t 597static ssize_t
598show_registers (struct class_device *class_dev, char *buf) 598show_registers(struct device *dev, struct device_attribute *attr, char *buf)
599{ 599{
600 struct usb_bus *bus; 600 struct usb_bus *bus;
601 struct usb_hcd *hcd; 601 struct usb_hcd *hcd;
@@ -606,7 +606,7 @@ show_registers (struct class_device *class_dev, char *buf)
606 char *next; 606 char *next;
607 u32 rdata; 607 u32 rdata;
608 608
609 bus = class_get_devdata(class_dev); 609 bus = dev_get_drvdata(dev);
610 hcd = bus_to_hcd(bus); 610 hcd = bus_to_hcd(bus);
611 ohci = hcd_to_ohci(hcd); 611 ohci = hcd_to_ohci(hcd);
612 regs = ohci->regs; 612 regs = ohci->regs;
@@ -679,27 +679,27 @@ done:
679 spin_unlock_irqrestore (&ohci->lock, flags); 679 spin_unlock_irqrestore (&ohci->lock, flags);
680 return PAGE_SIZE - size; 680 return PAGE_SIZE - size;
681} 681}
682static CLASS_DEVICE_ATTR (registers, S_IRUGO, show_registers, NULL); 682static DEVICE_ATTR(registers, S_IRUGO, show_registers, NULL);
683 683
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 device *dev = ohci_to_hcd(ohci)->self.dev;
688 int retval; 688 int retval;
689 689
690 retval = class_device_create_file(cldev, &class_device_attr_async); 690 retval = device_create_file(dev, &dev_attr_async);
691 retval = class_device_create_file(cldev, &class_device_attr_periodic); 691 retval = device_create_file(dev, &dev_attr_periodic);
692 retval = class_device_create_file(cldev, &class_device_attr_registers); 692 retval = device_create_file(dev, &dev_attr_registers);
693 ohci_dbg (ohci, "created debug files\n"); 693 ohci_dbg (ohci, "created debug files\n");
694} 694}
695 695
696static inline void remove_debug_files (struct ohci_hcd *ohci) 696static inline void remove_debug_files (struct ohci_hcd *ohci)
697{ 697{
698 struct class_device *cldev = ohci_to_hcd(ohci)->self.class_dev; 698 struct device *dev = ohci_to_hcd(ohci)->self.dev;
699 699
700 class_device_remove_file(cldev, &class_device_attr_async); 700 device_remove_file(dev, &dev_attr_async);
701 class_device_remove_file(cldev, &class_device_attr_periodic); 701 device_remove_file(dev, &dev_attr_periodic);
702 class_device_remove_file(cldev, &class_device_attr_registers); 702 device_remove_file(dev, &dev_attr_registers);
703} 703}
704 704
705#endif 705#endif