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>
This commit is contained in:
Geliang Tang 2015-12-23 21:26:50 +08:00 committed by Greg Kroah-Hartman
parent aa742683bb
commit 69ab55d7be
2 changed files with 2 additions and 2 deletions

View file

@ -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);
}
/*

View file

@ -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);
}
/**