]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/udl: don't set drm_device->dev_private
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 15 Apr 2020 07:39:47 +0000 (09:39 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 28 Apr 2020 13:18:27 +0000 (15:18 +0200)
We're mostly there already, just a handful of places that didn't use
the to_udl container_of cast. To make sure no new appear, don't set
->dev_private.

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Sean Paul <sean@poorly.run>
Cc: Emil Velikov <emil.l.velikov@gmail.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Alexios Zavras <alexios.zavras@intel.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "José Roberto de Souza" <jose.souza@intel.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Allison Randal <allison@lohutok.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20200415074034.175360-13-daniel.vetter@ffwll.ch
drivers/gpu/drm/udl/udl_connector.c
drivers/gpu/drm/udl/udl_drv.c
drivers/gpu/drm/udl/udl_modeset.c

index 0afdfb0d1fe1197d78115cff72830c1848842a23..cdc1c42e16695215f28b6f4acec56a0a85e4eea0 100644 (file)
@@ -59,7 +59,7 @@ static int udl_get_modes(struct drm_connector *connector)
 static enum drm_mode_status udl_mode_valid(struct drm_connector *connector,
                          struct drm_display_mode *mode)
 {
-       struct udl_device *udl = connector->dev->dev_private;
+       struct udl_device *udl = to_udl(connector->dev);
        if (!udl->sku_pixel_limit)
                return 0;
 
@@ -72,7 +72,7 @@ static enum drm_mode_status udl_mode_valid(struct drm_connector *connector,
 static enum drm_connector_status
 udl_detect(struct drm_connector *connector, bool force)
 {
-       struct udl_device *udl = connector->dev->dev_private;
+       struct udl_device *udl = to_udl(connector->dev);
        struct udl_drm_connector *udl_connector =
                                        container_of(connector,
                                        struct udl_drm_connector,
index 523f60e02a8534b39bb9ce8541456bcb045b4a0c..d1aa50fd6d65ab2fedcd7765b9f2928f4ec0f600 100644 (file)
@@ -63,7 +63,6 @@ static struct udl_device *udl_driver_create(struct usb_interface *interface)
                return udl;
 
        udl->udev = udev;
-       udl->drm.dev_private = udl;
 
        r = udl_init(udl);
        if (r)
index 8cad01f3d1637d1af95429892f3ba8831e970700..99518a826435f2e4d2af2d1507d1789bc68287ef 100644 (file)
@@ -215,7 +215,7 @@ static char *udl_dummy_render(char *wrptr)
 static int udl_crtc_write_mode_to_hw(struct drm_crtc *crtc)
 {
        struct drm_device *dev = crtc->dev;
-       struct udl_device *udl = dev->dev_private;
+       struct udl_device *udl = to_udl(dev);
        struct urb *urb;
        char *buf;
        int retval;
@@ -369,7 +369,7 @@ udl_simple_display_pipe_enable(struct drm_simple_display_pipe *pipe,
        struct drm_crtc *crtc = &pipe->crtc;
        struct drm_device *dev = crtc->dev;
        struct drm_framebuffer *fb = plane_state->fb;
-       struct udl_device *udl = dev->dev_private;
+       struct udl_device *udl = to_udl(dev);
        struct drm_display_mode *mode = &crtc_state->mode;
        char *buf;
        char *wrptr;
@@ -464,7 +464,7 @@ static const struct drm_mode_config_funcs udl_mode_funcs = {
 int udl_modeset_init(struct drm_device *dev)
 {
        size_t format_count = ARRAY_SIZE(udl_simple_display_pipe_formats);
-       struct udl_device *udl = dev->dev_private;
+       struct udl_device *udl = to_udl(dev);
        struct drm_connector *connector;
        int ret;