Skip to content

Commit 05deb1c

Browse files
Thomas Zimmermannlag-linaro
authored andcommitted
HID: picoLCD: Replace check_fb in favor of struct fb_info.lcd_dev
Store the lcd device in struct fb_info.lcd_dev. The lcd subsystem can now detect the lcd's fbdev device from this field. This makes the implementation of check_fb in picolcd_lcdops obsolete. Remove it. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Acked-by: Jiri Kosina <jkosina@suse.com> Link: https://lore.kernel.org/r/20240906075439.98476-26-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
1 parent 16d6110 commit 05deb1c

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

drivers/hid/hid-picolcd_fb.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,10 @@ int picolcd_init_framebuffer(struct picolcd_data *data)
497497
#endif
498498
#endif
499499

500+
#ifdef CONFIG_HID_PICOLCD_LCD
501+
info->lcd_dev = data->lcd;
502+
#endif
503+
500504
fbdata = info->par;
501505
spin_lock_init(&fbdata->lock);
502506
fbdata->picolcd = data;

drivers/hid/hid-picolcd_lcd.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,9 @@ static int picolcd_set_contrast(struct lcd_device *ldev, int contrast)
4141
return 0;
4242
}
4343

44-
static int picolcd_check_lcd_fb(struct lcd_device *ldev, struct fb_info *fb)
45-
{
46-
return fb && fb == picolcd_fbinfo((struct picolcd_data *)lcd_get_data(ldev));
47-
}
48-
4944
static const struct lcd_ops picolcd_lcdops = {
5045
.get_contrast = picolcd_get_contrast,
5146
.set_contrast = picolcd_set_contrast,
52-
.check_fb = picolcd_check_lcd_fb,
5347
};
5448

5549
int picolcd_init_lcd(struct picolcd_data *data, struct hid_report *report)

0 commit comments

Comments
 (0)