]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
fbdev: lcdcfb: Register sysfs groups through driver core
authorShixiong Ou <oushixiong@kylinos.cn>
Wed, 19 Feb 2025 08:44:27 +0000 (16:44 +0800)
committerHelge Deller <deller@gmx.de>
Wed, 26 Mar 2025 21:39:20 +0000 (22:39 +0100)
commita979182a2453de8e20858c14b2766062c67ab3bd
tree136e1e4f4997f703fb674b23954419ef3f2c5364
parent5bbcc7645f4b244ffb5ac6563fbe9d3d42194447
fbdev: lcdcfb: Register sysfs groups through driver core

[WHY]
   1. The driver forgot to call device_remove_file()
   in sh_mobile_lcdc_overlay_fb_unregister(), and there was
   no error handling when calling device_create_file() failed.

   2. This should probably use device_add_group() instead of
   individual files to simplify both creation and removal. [Arnd]

   3. The driver core can register and cleanup sysfs groups already.
   as commit 95cdd538e0e5 ("fbdev: efifb: Register sysfs groups
   through driver core").

[HOW]
   Register sysfs groups through driver core.

Signed-off-by: Shixiong Ou <oushixiong@kylinos.cn>
Signed-off-by: Helge Deller <deller@gmx.de>
drivers/video/fbdev/sh_mobile_lcdcfb.c