ACPI, APEI, ERST, Prevent erst_dbg from loading if ERST is disabled
authorHuang Ying <ying.huang@intel.com>
Wed, 13 Jul 2011 05:14:13 +0000 (13:14 +0800)
committerLen Brown <len.brown@intel.com>
Thu, 14 Jul 2011 03:29:52 +0000 (23:29 -0400)
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>
drivers/acpi/apei/erst-dbg.c

index a4cfb64..cb04aa4 100644 (file)
@@ -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);
 }