diff options
| author | Thomas Zimmermann <[email protected]> | 2020-11-03 11:34:56 +0000 |
|---|---|---|
| committer | Thomas Zimmermann <[email protected]> | 2020-11-09 08:16:13 +0000 |
| commit | 3fb91f56aea4608adebf7798788ac98b42a13838 (patch) | |
| tree | f32432ff79d83624a73291f4aa1b69918f40ccf9 /drivers/gpu/drm/udl/udl_connector.c | |
| parent | drm/tiny/gm12u320: Retrieve USB device from struct drm_device.dev (diff) | |
| download | kernel-3fb91f56aea4608adebf7798788ac98b42a13838.tar.gz kernel-3fb91f56aea4608adebf7798788ac98b42a13838.zip | |
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 <[email protected]>
Reviewed-by: Hans de Goede <[email protected]>
Acked-by: Daniel Vetter <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/udl/udl_connector.c')
| -rw-r--r-- | drivers/gpu/drm/udl/udl_connector.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/udl/udl_connector.c b/drivers/gpu/drm/udl/udl_connector.c index cdc1c42e1669..3750fd216131 100644 --- a/drivers/gpu/drm/udl/udl_connector.c +++ b/drivers/gpu/drm/udl/udl_connector.c @@ -20,6 +20,7 @@ static int udl_get_edid_block(void *data, u8 *buf, unsigned int block, int ret, i; u8 *read_buff; struct udl_device *udl = data; + struct usb_device *udev = udl_to_usb_device(udl); read_buff = kmalloc(2, GFP_KERNEL); if (!read_buff) @@ -27,10 +28,9 @@ static int udl_get_edid_block(void *data, u8 *buf, unsigned int block, for (i = 0; i < len; i++) { int bval = (i + block * EDID_LENGTH) << 8; - ret = usb_control_msg(udl->udev, - usb_rcvctrlpipe(udl->udev, 0), - (0x02), (0x80 | (0x02 << 5)), bval, - 0xA1, read_buff, 2, HZ); + ret = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), + 0x02, (0x80 | (0x02 << 5)), bval, + 0xA1, read_buff, 2, HZ); if (ret < 1) { DRM_ERROR("Read EDID byte %d failed err %x\n", i, ret); kfree(read_buff); |
