summaryrefslogtreecommitdiff
path: root/drivers/usb/usbip/vhci_sysfs.c
diff options
context:
space:
mode:
authorYuyang Du <yuyang.du@intel.com>2017-06-08 08:04:07 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-06-13 11:51:10 +0300
commit89a73d281fa4f58942474ada19d34d7ea39af2f4 (patch)
treee3630b0bf862cdeedc0caf6eebaab2c7b12600ec /drivers/usb/usbip/vhci_sysfs.c
parent559e9c00b340ab4929e36a6bb176ca11f95ef46a (diff)
downloadlinux-89a73d281fa4f58942474ada19d34d7ea39af2f4.tar.xz
usbip: vhci-hcd: Move VHCI platform device into vhci struct
Every VHCI is a platform device, so move the platform_device struct into the VHCI struct. Signed-off-by: Yuyang Du <yuyang.du@intel.com> Acked-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/usbip/vhci_sysfs.c')
-rw-r--r--drivers/usb/usbip/vhci_sysfs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/usbip/vhci_sysfs.c b/drivers/usb/usbip/vhci_sysfs.c
index d878faa3f52c..07f0d3789a8c 100644
--- a/drivers/usb/usbip/vhci_sysfs.c
+++ b/drivers/usb/usbip/vhci_sysfs.c
@@ -32,7 +32,7 @@
/* Sysfs entry to show port status */
static ssize_t status_show_vhci(int pdev_nr, char *out)
{
- struct platform_device *pdev = *(vhci_pdevs + pdev_nr);
+ struct platform_device *pdev = vhcis[pdev_nr].pdev;
struct vhci_hcd *vhci;
char *s = out;
int i = 0;
@@ -206,7 +206,7 @@ static ssize_t store_detach(struct device *dev, struct device_attribute *attr,
if (!valid_port(pdev_nr, rhport))
return -EINVAL;
- hcd = platform_get_drvdata(*(vhci_pdevs + pdev_nr));
+ hcd = platform_get_drvdata(vhcis[pdev_nr].pdev);
if (hcd == NULL) {
dev_err(dev, "port is not ready %u\n", port);
return -EAGAIN;
@@ -287,7 +287,7 @@ static ssize_t store_attach(struct device *dev, struct device_attribute *attr,
if (!valid_args(pdev_nr, rhport, speed))
return -EINVAL;
- hcd = platform_get_drvdata(*(vhci_pdevs + pdev_nr));
+ hcd = platform_get_drvdata(vhcis[pdev_nr].pdev);
if (hcd == NULL) {
dev_err(dev, "port %d is not ready\n", port);
return -EAGAIN;