summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/udl/udl_drv.h
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2020-11-03 14:34:56 +0300
committerThomas Zimmermann <tzimmermann@suse.de>2020-11-09 11:16:13 +0300
commit3fb91f56aea4608adebf7798788ac98b42a13838 (patch)
treef32432ff79d83624a73291f4aa1b69918f40ccf9 /drivers/gpu/drm/udl/udl_drv.h
parent0454bc59be9e988422793f55a089ee4e86f11f25 (diff)
downloadlinux-3fb91f56aea4608adebf7798788ac98b42a13838.tar.xz
drm/udl: Retrieve USB device from struct drm_device.dev
Drop the driver's udev field in favor of struct drm_device.dev. No functional changes made. v3: * upcast dev with udl_to_usb_device() v2: * upcast dev with drm_dev_get_usb_device() Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20201103113456.3066-3-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/udl/udl_drv.h')
-rw-r--r--drivers/gpu/drm/udl/udl_drv.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/udl/udl_drv.h b/drivers/gpu/drm/udl/udl_drv.h
index b1461f30780b..875e73551ae9 100644
--- a/drivers/gpu/drm/udl/udl_drv.h
+++ b/drivers/gpu/drm/udl/udl_drv.h
@@ -50,7 +50,6 @@ struct urb_list {
struct udl_device {
struct drm_device drm;
struct device *dev;
- struct usb_device *udev;
struct drm_simple_display_pipe display_pipe;
@@ -66,6 +65,11 @@ struct udl_device {
#define to_udl(x) container_of(x, struct udl_device, drm)
+static inline struct usb_device *udl_to_usb_device(struct udl_device *udl)
+{
+ return interface_to_usbdev(to_usb_interface(udl->drm.dev));
+}
+
/* modeset */
int udl_modeset_init(struct drm_device *dev);
struct drm_connector *udl_connector_init(struct drm_device *dev);