aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci-dbg.c
diff options
context:
space:
mode:
authorTony Jones <tonyj@suse.de>2007-09-11 14:07:31 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2008-02-01 14:34:46 -0800
commit5a3201b2809a9f7bcda8413c445483f5b5e490a3 (patch)
tree3be21f9b9a8fa953645b889bbf31c3b8ec6f19a0 /drivers/usb/host/ohci-dbg.c
parentde6f92b9ee00e9f841fb1a63d0bd60593ec55dbe (diff)
downloadkernel_samsung_smdk4412-5a3201b2809a9f7bcda8413c445483f5b5e490a3.zip
kernel_samsung_smdk4412-5a3201b2809a9f7bcda8413c445483f5b5e490a3.tar.gz
kernel_samsung_smdk4412-5a3201b2809a9f7bcda8413c445483f5b5e490a3.tar.bz2
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 ebab5ce..9bd5898 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)
}
static ssize_t
-show_async (struct class_device *class_dev, char *buf)
+show_async(struct device *dev, struct device_attribute *attr, char *buf)
{
struct usb_bus *bus;
struct usb_hcd *hcd;
@@ -476,7 +476,7 @@ show_async (struct class_device *class_dev, char *buf)
size_t temp;
unsigned long flags;
- bus = class_get_devdata(class_dev);
+ bus = dev_get_drvdata(dev);
hcd = bus_to_hcd(bus);
ohci = hcd_to_ohci(hcd);
@@ -488,13 +488,13 @@ show_async (struct class_device *class_dev, char *buf)
return temp;
}
-static CLASS_DEVICE_ATTR (async, S_IRUGO, show_async, NULL);
+static DEVICE_ATTR(async, S_IRUGO, show_async, NULL);
#define DBG_SCHED_LIMIT 64
static ssize_t
-show_periodic (struct class_device *class_dev, char *buf)
+show_periodic(struct device *dev, struct device_attribute *attr, char *buf)
{
struct usb_bus *bus;
struct usb_hcd *hcd;
@@ -509,7 +509,7 @@ show_periodic (struct class_device *class_dev, char *buf)
return 0;
seen_count = 0;
- bus = class_get_devdata(class_dev);
+ bus = dev_get_drvdata(dev);
hcd = bus_to_hcd(bus);
ohci = hcd_to_ohci(hcd);
next = buf;
@@ -589,13 +589,13 @@ show_periodic (struct class_device *class_dev, char *buf)
return PAGE_SIZE - size;
}
-static CLASS_DEVICE_ATTR (periodic, S_IRUGO, show_periodic, NULL);
+static DEVICE_ATTR(periodic, S_IRUGO, show_periodic, NULL);
#undef DBG_SCHED_LIMIT
static ssize_t
-show_registers (struct class_device *class_dev, char *buf)
+show_registers(struct device *dev, struct device_attribute *attr, char *buf)
{
struct usb_bus *bus;
struct usb_hcd *hcd;
@@ -606,7 +606,7 @@ show_registers (struct class_device *class_dev, char *buf)
char *next;
u32 rdata;
- bus = class_get_devdata(class_dev);
+ bus = dev_get_drvdata(dev);
hcd = bus_to_hcd(bus);
ohci = hcd_to_ohci(hcd);
regs = ohci->regs;
@@ -679,27 +679,27 @@ done:
spin_unlock_irqrestore (&ohci->lock, flags);
return PAGE_SIZE - size;
}
-static CLASS_DEVICE_ATTR (registers, S_IRUGO, show_registers, NULL);
+static 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 device *dev = ohci_to_hcd(ohci)->self.dev;
int retval;
- retval = class_device_create_file(cldev, &class_device_attr_async);
- retval = class_device_create_file(cldev, &class_device_attr_periodic);
- retval = class_device_create_file(cldev, &class_device_attr_registers);
+ retval = device_create_file(dev, &dev_attr_async);
+ retval = device_create_file(dev, &dev_attr_periodic);
+ retval = device_create_file(dev, &dev_attr_registers);
ohci_dbg (ohci, "created debug files\n");
}
static inline void remove_debug_files (struct ohci_hcd *ohci)
{
- struct class_device *cldev = ohci_to_hcd(ohci)->self.class_dev;
+ struct device *dev = ohci_to_hcd(ohci)->self.dev;
- class_device_remove_file(cldev, &class_device_attr_async);
- class_device_remove_file(cldev, &class_device_attr_periodic);
- class_device_remove_file(cldev, &class_device_attr_registers);
+ device_remove_file(dev, &dev_attr_async);
+ device_remove_file(dev, &dev_attr_periodic);
+ device_remove_file(dev, &dev_attr_registers);
}
#endif