Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753322Ab1EQIJX (ORCPT ); Tue, 17 May 2011 04:09:23 -0400 Received: from mga11.intel.com ([192.55.52.93]:18452 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752227Ab1EQIJD (ORCPT ); Tue, 17 May 2011 04:09:03 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.65,224,1304319600"; d="scan'208";a="2661723" From: Huang Ying To: Len Brown Cc: linux-kernel@vger.kernel.org, Andi Kleen , Tony Luck , ying.huang@intel.com, linux-acpi@vger.kernel.org Subject: [PATCH 9/9] ACPI, APEI, ERST, Prevent erst_dbg from loading if ERST is disabled Date: Tue, 17 May 2011 16:08:39 +0800 Message-Id: <1305619719-7480-10-git-send-email-ying.huang@intel.com> X-Mailer: git-send-email 1.7.4.4 In-Reply-To: <1305619719-7480-1-git-send-email-ying.huang@intel.com> References: <1305619719-7480-1-git-send-email-ying.huang@intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 814 Lines: 26 erst_dbg module can not work with ERST is disabled. So disable module loading to provide clearer information to user. Signed-off-by: Huang Ying --- drivers/acpi/apei/erst-dbg.c | 4 ++++ 1 file changed, 4 insertions(+) --- 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); } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/