fbdev/smscufx: Detect registered fb_info from refcount
authorThomas Zimmermann <tzimmermann@suse.de>
Tue, 13 Jun 2023 11:07:05 +0000 (13:07 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Tue, 27 Jun 2023 07:58:50 +0000 (09:58 +0200)
commitf5c6291f12090c4a0cdf0832da513c5a3e41d186
tree5f068c44754bd48b018a37c5c4dafc43bf74a0e4
parent1d4423d3f0058793f4c6dbc9cdade1742d105a6b
fbdev/smscufx: Detect registered fb_info from refcount

Detect registered instances of fb_info by reading the reference
counter from struct fb_info.read. Avoids looking at the dev field
and prepares fbdev for making struct fb_info.dev optional.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Steve Glendinning <steve.glendinning@shawell.net>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230613110953.24176-31-tzimmermann@suse.de
drivers/video/fbdev/smscufx.c