Commit 69ab55d7 authored by Geliang Tang's avatar Geliang Tang Committed by Greg Kroah-Hartman

USB: core, devio: use to_usb_device

Use to_usb_device() instead of open-coding it.
Signed-off-by: default avatarGeliang Tang <geliangtang@163.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent aa742683
......@@ -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);
}
/*
......
......@@ -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);
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment