]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
fbdev: omapfb: panel-sony-acx565akm: Simplify show_cabc_available_modes()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Thu, 8 Aug 2024 09:46:11 +0000 (11:46 +0200)
committerHelge Deller <deller@gmx.de>
Fri, 30 Aug 2024 16:42:38 +0000 (18:42 +0200)
commit33ae421ad2b546e472e36d73cf13f2b3b386f713
treef7dd6fd15e30a33db0f7b60beaf6ec253d333959
parent5ee70bec7945827c4661b9d44b094aac352dbaa8
fbdev: omapfb: panel-sony-acx565akm: Simplify show_cabc_available_modes()

Use sysfs_emit_at() instead of snprintf() + custom logic.
Using sysfs_emit_at() is much more simple.

Also, sysfs_emit() is already used in this function, so using
sysfs_emit_at() is more consistent.

Also simplify the logic:
  - always add a space after an entry
  - change the last space into a '\n'

Finally it is easy to see that, given the size of cabc_modes, PAGE_SIZE
can not be reached.
So better keep everything simple (and correct).

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Signed-off-by: Helge Deller <deller@gmx.de>
drivers/video/fbdev/omap2/omapfb/displays/panel-sony-acx565akm.c