mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-13 19:59:34 -04:00
hid: hid-picolcd: Fix initialization order
For drivers that support backlight, LCD and fbdev devices, fbdev has to be initialized last. See documentation for struct fbinfo.bl_dev. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Bruno Prémont <bonbons@linux-vserver.org> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://lore.kernel.org/r/20240305162425.23845-4-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
committed by
Lee Jones
parent
330682161d
commit
e755554568
@@ -474,11 +474,6 @@ static int picolcd_probe_lcd(struct hid_device *hdev, struct picolcd_data *data)
|
||||
if (error)
|
||||
goto err;
|
||||
|
||||
/* Set up the framebuffer device */
|
||||
error = picolcd_init_framebuffer(data);
|
||||
if (error)
|
||||
goto err;
|
||||
|
||||
/* Setup lcd class device */
|
||||
error = picolcd_init_lcd(data, picolcd_out_report(REPORT_CONTRAST, hdev));
|
||||
if (error)
|
||||
@@ -489,6 +484,11 @@ static int picolcd_probe_lcd(struct hid_device *hdev, struct picolcd_data *data)
|
||||
if (error)
|
||||
goto err;
|
||||
|
||||
/* Set up the framebuffer device */
|
||||
error = picolcd_init_framebuffer(data);
|
||||
if (error)
|
||||
goto err;
|
||||
|
||||
/* Setup the LED class devices */
|
||||
error = picolcd_init_leds(data, picolcd_out_report(REPORT_LED_STATE, hdev));
|
||||
if (error)
|
||||
@@ -502,9 +502,9 @@ static int picolcd_probe_lcd(struct hid_device *hdev, struct picolcd_data *data)
|
||||
return 0;
|
||||
err:
|
||||
picolcd_exit_leds(data);
|
||||
picolcd_exit_framebuffer(data);
|
||||
picolcd_exit_backlight(data);
|
||||
picolcd_exit_lcd(data);
|
||||
picolcd_exit_framebuffer(data);
|
||||
picolcd_exit_cir(data);
|
||||
picolcd_exit_keys(data);
|
||||
return error;
|
||||
@@ -623,9 +623,9 @@ static void picolcd_remove(struct hid_device *hdev)
|
||||
/* Cleanup LED */
|
||||
picolcd_exit_leds(data);
|
||||
/* Clean up the framebuffer */
|
||||
picolcd_exit_framebuffer(data);
|
||||
picolcd_exit_backlight(data);
|
||||
picolcd_exit_lcd(data);
|
||||
picolcd_exit_framebuffer(data);
|
||||
/* Cleanup input */
|
||||
picolcd_exit_cir(data);
|
||||
picolcd_exit_keys(data);
|
||||
|
||||
Reference in New Issue
Block a user