diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2023-06-13 13:06:42 +0200 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2023-06-27 09:58:48 +0200 |
commit | 9765d4120b1a31af9ae2fcc15f14f1713e6cdbff (patch) | |
tree | bd712a8d683af7187862601c8d7e1e9b19c188cb /drivers/video/fbdev/aty | |
parent | 7fa1675e840535876921b44d7f88b9b314d13edf (diff) | |
download | linux-9765d4120b1a31af9ae2fcc15f14f1713e6cdbff.tar.gz linux-9765d4120b1a31af9ae2fcc15f14f1713e6cdbff.tar.bz2 linux-9765d4120b1a31af9ae2fcc15f14f1713e6cdbff.zip |
fbdev/atyfb: Reorder backlight and framebuffer init/cleanup
The driver's backlight code requires the framebuffer to be
registered. Therefore reorder the init and cleanup calls for
both data structures.
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-8-tzimmermann@suse.de
Diffstat (limited to 'drivers/video/fbdev/aty')
-rw-r--r-- | drivers/video/fbdev/aty/atyfb_base.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/video/fbdev/aty/atyfb_base.c b/drivers/video/fbdev/aty/atyfb_base.c index cba2b113b28b..51504fe39054 100644 --- a/drivers/video/fbdev/aty/atyfb_base.c +++ b/drivers/video/fbdev/aty/atyfb_base.c @@ -2654,11 +2654,6 @@ static int aty_init(struct fb_info *info) USE_F32KHZ | TRISTATE_MEM_EN, par); } else #endif - if (M64_HAS(MOBIL_BUS) && backlight) { -#ifdef CONFIG_FB_ATY_BACKLIGHT - aty_bl_init(par); -#endif - } memset(&var, 0, sizeof(var)); #ifdef CONFIG_PPC @@ -2751,6 +2746,12 @@ static int aty_init(struct fb_info *info) goto aty_init_exit; } + if (M64_HAS(MOBIL_BUS) && backlight) { +#ifdef CONFIG_FB_ATY_BACKLIGHT + aty_bl_init(par); +#endif + } + fb_list = info; PRINTKI("fb%d: %s frame buffer device on %s\n", @@ -3716,12 +3717,13 @@ static void atyfb_remove(struct fb_info *info) aty_set_crtc(par, &par->saved_crtc); par->pll_ops->set_pll(info, &par->saved_pll); - unregister_framebuffer(info); - #ifdef CONFIG_FB_ATY_BACKLIGHT if (M64_HAS(MOBIL_BUS)) aty_bl_exit(info->bl_dev); #endif + + unregister_framebuffer(info); + arch_phys_wc_del(par->wc_cookie); #ifndef __sparc__ |