From: Shixiong Ou <[email protected]>

Replace direct access to map->vaddr with the new iosys_map_get_vaddr()
helper function. This properly uses the iosys_map abstraction layer
instead of directly accessing structure members.

Signed-off-by: Shixiong Ou <[email protected]>
---
 drivers/gpu/drm/udl/udl_modeset.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/udl/udl_modeset.c 
b/drivers/gpu/drm/udl/udl_modeset.c
index 289711035b67..06a3a4d149b9 100644
--- a/drivers/gpu/drm/udl/udl_modeset.c
+++ b/drivers/gpu/drm/udl/udl_modeset.c
@@ -207,12 +207,16 @@ static int udl_handle_damage(struct drm_framebuffer *fb,
 {
        struct drm_device *dev = fb->dev;
        struct udl_device *udl = to_udl(dev);
-       void *vaddr = map->vaddr; /* TODO: Use mapping abstraction properly */
+       void *vaddr;
        int i, ret;
        char *cmd;
        struct urb *urb;
        int log_bpp;
 
+       vaddr = iosys_map_get_vaddr(map);
+       if (!vaddr)
+               return -EFAULT;
+
        ret = udl_log_cpp(fb->format->cpp[0]);
        if (ret < 0)
                return ret;
-- 
2.25.1


No virus found
                Checked by Hillstone Network AntiVirus

Reply via email to