diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2024-03-05 17:22:36 +0100 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2024-03-28 11:08:57 +0100 |
commit | e755554568fbe638bb69f0faffb116436ec28af2 (patch) | |
tree | b3c005011f27d838cb3feb6217f83f3254d3a4f2 /drivers/hid | |
parent | auxdisplay: ht16k33: Remove struct backlight_ops.check_fb (diff) | |
download | linux-e755554568fbe638bb69f0faffb116436ec28af2.tar.xz linux-e755554568fbe638bb69f0faffb116436ec28af2.zip |
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>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-picolcd_core.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/hid/hid-picolcd_core.c b/drivers/hid/hid-picolcd_core.c index bbda231a7ce3..5ddebe25eb91 100644 --- a/drivers/hid/hid-picolcd_core.c +++ b/drivers/hid/hid-picolcd_core.c @@ -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); |