diff options
author | Benjamin Tissoires <bentiss@kernel.org> | 2024-07-16 12:19:28 +0200 |
---|---|---|
committer | Benjamin Tissoires <bentiss@kernel.org> | 2024-07-16 12:19:28 +0200 |
commit | 3c69140734a27f8b145f12fa0ae80c1fe36a02ca (patch) | |
tree | ad36bf7e6a5400212fbf917eceb4c7ad4df5d557 /drivers/hid | |
parent | 5ba28be6be8ac6cd4fa1ac67cd4da237d39917d2 (diff) | |
parent | 8a25418ba65a5d2494b369f6178a284c449bc399 (diff) |
Merge branch 'for-6.11/trivial' into for-linus
Couple of trivial fixes:
- extra semicolon (Chen Ni)
- typo (Thorsten Blum)
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-mcp2221.c | 2 | ||||
-rw-r--r-- | drivers/hid/hid-picolcd_backlight.c | 7 | ||||
-rw-r--r-- | drivers/hid/hid-picolcd_core.c | 14 | ||||
-rw-r--r-- | drivers/hid/hid-picolcd_fb.c | 6 | ||||
-rw-r--r-- | drivers/hid/hid-picolcd_lcd.c | 2 | ||||
-rw-r--r-- | drivers/hid/hid-steam.c | 4 |
6 files changed, 17 insertions, 18 deletions
diff --git a/drivers/hid/hid-mcp2221.c b/drivers/hid/hid-mcp2221.c index da5ea5a23b08..0f93c22a479f 100644 --- a/drivers/hid/hid-mcp2221.c +++ b/drivers/hid/hid-mcp2221.c @@ -1048,7 +1048,7 @@ static int mcp_iio_channels(struct mcp2221 *mcp) break; default: continue; - }; + } chan->type = IIO_VOLTAGE; chan->indexed = 1; diff --git a/drivers/hid/hid-picolcd_backlight.c b/drivers/hid/hid-picolcd_backlight.c index 5bd2a8c4bbd6..08d16917eb60 100644 --- a/drivers/hid/hid-picolcd_backlight.c +++ b/drivers/hid/hid-picolcd_backlight.c @@ -9,7 +9,6 @@ #include <linux/hid.h> -#include <linux/fb.h> #include <linux/backlight.h> #include "hid-picolcd.h" @@ -39,15 +38,9 @@ static int picolcd_set_brightness(struct backlight_device *bdev) return 0; } -static int picolcd_check_bl_fb(struct backlight_device *bdev, struct fb_info *fb) -{ - return fb && fb == picolcd_fbinfo((struct picolcd_data *)bl_get_data(bdev)); -} - static const struct backlight_ops picolcd_blops = { .update_status = picolcd_set_brightness, .get_brightness = picolcd_get_brightness, - .check_fb = picolcd_check_bl_fb, }; int picolcd_init_backlight(struct picolcd_data *data, struct hid_report *report) diff --git a/drivers/hid/hid-picolcd_core.c b/drivers/hid/hid-picolcd_core.c index fa46fb6eab3f..297103be3381 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); diff --git a/drivers/hid/hid-picolcd_fb.c b/drivers/hid/hid-picolcd_fb.c index 063f9c01d2f7..83e3409d170c 100644 --- a/drivers/hid/hid-picolcd_fb.c +++ b/drivers/hid/hid-picolcd_fb.c @@ -491,6 +491,12 @@ int picolcd_init_framebuffer(struct picolcd_data *data) info->fix = picolcdfb_fix; info->fix.smem_len = PICOLCDFB_SIZE*8; +#ifdef CONFIG_FB_BACKLIGHT +#ifdef CONFIG_HID_PICOLCD_BACKLIGHT + info->bl_dev = data->backlight; +#endif +#endif + fbdata = info->par; spin_lock_init(&fbdata->lock); fbdata->picolcd = data; diff --git a/drivers/hid/hid-picolcd_lcd.c b/drivers/hid/hid-picolcd_lcd.c index 0c4b76de8ae5..061a33ba7b1d 100644 --- a/drivers/hid/hid-picolcd_lcd.c +++ b/drivers/hid/hid-picolcd_lcd.c @@ -46,7 +46,7 @@ static int picolcd_check_lcd_fb(struct lcd_device *ldev, struct fb_info *fb) return fb && fb == picolcd_fbinfo((struct picolcd_data *)lcd_get_data(ldev)); } -static struct lcd_ops picolcd_lcdops = { +static const struct lcd_ops picolcd_lcdops = { .get_contrast = picolcd_get_contrast, .set_contrast = picolcd_set_contrast, .check_fb = picolcd_check_lcd_fb, diff --git a/drivers/hid/hid-steam.c b/drivers/hid/hid-steam.c index bfba204fc45e..bf8b633114be 100644 --- a/drivers/hid/hid-steam.c +++ b/drivers/hid/hid-steam.c @@ -1268,7 +1268,7 @@ static int steam_probe(struct hid_device *hdev, steam->client_hdev = steam_create_client_hid(hdev); if (IS_ERR(steam->client_hdev)) { ret = PTR_ERR(steam->client_hdev); - goto err_stream_unregister; + goto err_steam_unregister; } steam->client_hdev->driver_data = steam; @@ -1280,7 +1280,7 @@ static int steam_probe(struct hid_device *hdev, err_destroy: hid_destroy_device(steam->client_hdev); -err_stream_unregister: +err_steam_unregister: if (steam->connected) steam_unregister(steam); err_hw_close: |