diff options
author | Huang Ying <ying.huang@intel.com> | 2011-07-13 09:14:13 +0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2011-07-14 07:29:52 +0400 |
commit | ca7cc5110a313a609da40ae948978a585352564b (patch) | |
tree | 1b170de2a91579251e25f7c2eaf20891e20f1622 /drivers/acpi/apei | |
parent | 4d2b2956ef1113f1cc43e98e947c20d9c7d2712c (diff) | |
download | linux-ca7cc5110a313a609da40ae948978a585352564b.tar.xz |
ACPI, APEI, ERST, Prevent erst_dbg from loading if ERST is disabled
erst_dbg module can not work when ERST is disabled. So disable module
loading to provide clearer information to user.
Signed-off-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/apei')
-rw-r--r-- | drivers/acpi/apei/erst-dbg.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/acpi/apei/erst-dbg.c b/drivers/acpi/apei/erst-dbg.c index a4cfb64c86a1..cb04aa43c33a 100644 --- a/drivers/acpi/apei/erst-dbg.c +++ b/drivers/acpi/apei/erst-dbg.c @@ -213,6 +213,10 @@ static struct miscdevice erst_dbg_dev = { static __init int erst_dbg_init(void) { + if (erst_disable) { + pr_info(ERST_DBG_PFX "ERST support is disabled.\n"); + return -ENODEV; + } return misc_register(&erst_dbg_dev); } |