]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
fbdev: au1100fb: Don't store device specific data in global variables
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Sun, 15 Feb 2026 23:33:17 +0000 (00:33 +0100)
committerHelge Deller <deller@gmx.de>
Thu, 19 Feb 2026 16:38:16 +0000 (17:38 +0100)
commit7939cecdc6fa39ea9e74507a389f31a7a7936b18
tree1e219e1906708ee2b2991a88d3dc75453eac4188
parent26a4cfaff82a2dcb810f6bfd5f4842f9b6046c8a
fbdev: au1100fb: Don't store device specific data in global variables

Using global data to store device specific data is a bad pattern that
breaks if there is more than one device. So expand driver data and drop
the global variables.

While there is probably no machine that has two or more au1100fb
devices, this makes the driver a better template for new drivers and
saves some memory if there is no such bound device.

bloat-o-meter reports (for ARCH=arm allmodconfig + CONFIG_FB_AU1100=y
and ignoring the rename of the init function):

add/remove: 1/4 grow/shrink: 2/2 up/down: 1360/-4800 (-3440)
Function                                     old     new   delta
au1100fb_drv_probe                          2648    3328    +680
$a                                         12808   13484    +676
au1100fb_drv_resume                          404     400      -4
au1100fb_fix                                  68       -     -68
au1100fb_var                                 160       -    -160
fbregs                                      2048       -   -2048
$d                                          9525    7009   -2516
Total: Before=38664, After=35224, chg -8.90%

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Signed-off-by: Helge Deller <deller@gmx.de>
drivers/video/fbdev/au1100fb.c
drivers/video/fbdev/au1100fb.h