From: Huang Ying Date: Wed, 13 Jul 2011 05:14:13 +0000 (+0800) Subject: ACPI, APEI, ERST, Prevent erst_dbg from loading if ERST is disabled X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ca7cc5110a313a609da40ae948978a585352564b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Len Brown --- 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); }