]> git.dujemihanovic.xyz Git - linux.git/commitdiff
fbdev/metronomefb: Use hardware device for dev_err()
authorThomas Zimmermann <tzimmermann@suse.de>
Tue, 13 Jun 2023 11:06:52 +0000 (13:06 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Tue, 27 Jun 2023 07:58:49 +0000 (09:58 +0200)
Replace the use of the fbdev software device, stored in struct
fb_info.dev, with the hardware device from struct fb_info.device
in load_waveform(). The device is only used for printing errors
with dev_err().

This change aligns load_waveform() with the rest of the driver and
prepares fbdev for making struct fb_info.dev optional.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230613110953.24176-18-tzimmermann@suse.de
drivers/video/fbdev/metronomefb.c

index bac255c749e788634030c83c4a88ecdb746836fe..3e1daca76e114e238d5d9d02801615c597006168 100644 (file)
@@ -181,7 +181,7 @@ static int load_waveform(u8 *mem, size_t size, int m, int t,
        int mem_idx = 0;
        struct waveform_hdr *wfm_hdr;
        u8 *metromem = par->metromem_wfm;
-       struct device *dev = par->info->dev;
+       struct device *dev = par->info->device;
 
        if (user_wfm_size)
                epd_frame_table[par->dt].wfm_size = user_wfm_size;