Skip to contentSkip to conversation

ACPI, APEI, ERST, Prevent erst_dbg from loading if ERST is disabled

RFC New Huang Ying 1 participant 1 message May 10, 2011

Subsystems (2)
lore
Share & tools
lore

Huang Ying

author
#0 lore raw

RFC 1/1 ACPI, APEI, ERST, Prevent erst_dbg from loading if ERST is disabled

erst_dbg module can not work with ERST is disabled. So disable module loading to provide clearer information to user.

---
 drivers/acpi/apei/erst-dbg.c |    4 ++++
 1 file changed, 4 insertions(+)
drivers/acpi/apei/erst-dbg.c +4 -0
@@ -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);
 }