diff options
author | Tony Jones <tonyj@suse.de> | 2007-09-11 14:07:31 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-02-01 14:34:46 -0800 |
commit | 5a3201b2809a9f7bcda8413c445483f5b5e490a3 (patch) | |
tree | 3be21f9b9a8fa953645b889bbf31c3b8ec6f19a0 /drivers/usb/host/ehci-hub.c | |
parent | de6f92b9ee00e9f841fb1a63d0bd60593ec55dbe (diff) | |
download | linux-3.10-5a3201b2809a9f7bcda8413c445483f5b5e490a3.tar.gz linux-3.10-5a3201b2809a9f7bcda8413c445483f5b5e490a3.tar.bz2 linux-3.10-5a3201b2809a9f7bcda8413c445483f5b5e490a3.zip |
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/ehci-hub.c')
-rw-r--r-- | drivers/usb/host/ehci-hub.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index 735db4aec83..1ad7a657282 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c @@ -291,14 +291,16 @@ static int ehci_bus_resume (struct usb_hcd *hcd) /*-------------------------------------------------------------------------*/ /* Display the ports dedicated to the companion controller */ -static ssize_t show_companion(struct class_device *class_dev, char *buf) +static ssize_t show_companion(struct device *dev, + struct device_attribute *attr, + char *buf) { struct ehci_hcd *ehci; int nports, index, n; int count = PAGE_SIZE; char *ptr = buf; - ehci = hcd_to_ehci(bus_to_hcd(class_get_devdata(class_dev))); + ehci = hcd_to_ehci(bus_to_hcd(dev_get_drvdata(dev))); nports = HCS_N_PORTS(ehci->hcs_params); for (index = 0; index < nports; ++index) { @@ -316,15 +318,16 @@ static ssize_t show_companion(struct class_device *class_dev, char *buf) * Syntax is "[-]portnum", where a leading '-' sign means * return control of the port to the EHCI controller. */ -static ssize_t store_companion(struct class_device *class_dev, - const char *buf, size_t count) +static ssize_t store_companion(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) { struct ehci_hcd *ehci; int portnum, new_owner, try; u32 __iomem *status_reg; u32 port_status; - ehci = hcd_to_ehci(bus_to_hcd(class_get_devdata(class_dev))); + ehci = hcd_to_ehci(bus_to_hcd(dev_get_drvdata(dev))); new_owner = PORT_OWNER; /* Owned by companion */ if (sscanf(buf, "%d", &portnum) != 1) return -EINVAL; @@ -364,7 +367,7 @@ static ssize_t store_companion(struct class_device *class_dev, } return count; } -static CLASS_DEVICE_ATTR(companion, 0644, show_companion, store_companion); +static DEVICE_ATTR(companion, 0644, show_companion, store_companion); static inline void create_companion_file(struct ehci_hcd *ehci) { @@ -372,16 +375,16 @@ static inline void create_companion_file(struct ehci_hcd *ehci) /* with integrated TT there is no companion! */ if (!ehci_is_TDI(ehci)) - i = class_device_create_file(ehci_to_hcd(ehci)->self.class_dev, - &class_device_attr_companion); + i = device_create_file(ehci_to_hcd(ehci)->self.dev, + &dev_attr_companion); } static inline void remove_companion_file(struct ehci_hcd *ehci) { /* with integrated TT there is no companion! */ if (!ehci_is_TDI(ehci)) - class_device_remove_file(ehci_to_hcd(ehci)->self.class_dev, - &class_device_attr_companion); + device_remove_file(ehci_to_hcd(ehci)->self.dev, + &dev_attr_companion); } |