platform/x86: acerhdf: restructure to allow large BIOS table be __initconst
authorPaul Gortmaker <paul.gortmaker@windriver.com>
Fri, 21 Sep 2018 01:44:21 +0000 (21:44 -0400)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 27 Sep 2018 09:18:08 +0000 (12:18 +0300)
commitf7eaf3fb9d10cc72669fe8c8bd204087a65e50f6
treec362a4cbfa28eb5e56528eccd6a1fcdabb439135
parent1d0c3fd01afbd52cc365460d46176b6b4131960d
platform/x86: acerhdf: restructure to allow large BIOS table be __initconst

There is a table of Vendor/Model/Version {control data} in this driver,
but outside of the initial probe, the V/M/V is never used again, and
neither are any of the entries for platforms other than the one which
matches the running target.

By simply storing the {control data} for the matched platform, we can
mark the large table __initconst, which reduces the loaded driver size
by 20 percent.

Before:
root@gw:~/git/linux-head# lsmod
Module                  Size  Used by
acerhdf                20480  0
root@gw:~/git/linux-head#

After:
root@gw:~/git/linux-head# lsmod
Module                  Size  Used by
acerhdf                16384  0
root@gw:~/git/linux-head#

Cc: Peter Feuerer <peter@piie.net>
Cc: Darren Hart <dvhart@infradead.org>
Cc: Andy Shevchenko <andy@infradead.org>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Peter Feuerer <peter@piie.net>
drivers/platform/x86/acerhdf.c