summaryrefslogtreecommitdiffstats
path: root/drivers/usb/core
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@163.com>2015-12-23 21:26:50 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-01-24 21:00:33 -0800
commit69ab55d7be6c3d69fa2e38f2a2bed4e91b9edf8d (patch)
treeff533014371e8692fe7a973194de09f8805ba0d2 /drivers/usb/core
parentaa742683bbea9f2faa28ec2f61745abf2ad86a9d (diff)
downloadop-kernel-dev-69ab55d7be6c3d69fa2e38f2a2bed4e91b9edf8d.zip
op-kernel-dev-69ab55d7be6c3d69fa2e38f2a2bed4e91b9edf8d.tar.gz
USB: core, devio: use to_usb_device
Use to_usb_device() instead of open-coding it. Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r--drivers/usb/core/devio.c2
-rw-r--r--drivers/usb/core/usb.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 054eb53..13a4b9f 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -848,7 +848,7 @@ static struct usb_device *usbdev_lookup_by_devt(dev_t devt)
(void *) (unsigned long) devt, match_devt);
if (!dev)
return NULL;
- return container_of(dev, struct usb_device, dev);
+ return to_usb_device(dev);
}
/*
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index ebb29ca..49b011f 100644
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -241,7 +241,7 @@ static int __each_dev(struct device *dev, void *data)
if (!is_usb_device(dev))
return 0;
- return arg->fn(container_of(dev, struct usb_device, dev), arg->data);
+ return arg->fn(to_usb_device(dev), arg->data);
}
/**
OpenPOWER on IntegriCloud