Skip to content

Commit

Permalink
ACPI, APEI, ERST, Prevent erst_dbg from loading if ERST is disabled
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Huang Ying authored and Len Brown committed Jul 14, 2011
1 parent 4d2b295 commit ca7cc51
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/acpi/apei/erst-dbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit ca7cc51

Please sign in to comment.