From patchwork Wed Dec 16 14:40:29 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhao, Yakui" X-Patchwork-Id: 68375 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id nBI4ixoT005715 for ; Fri, 18 Dec 2009 04:46:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762188AbZLPOmV (ORCPT ); Wed, 16 Dec 2009 09:42:21 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1762179AbZLPOmU (ORCPT ); Wed, 16 Dec 2009 09:42:20 -0500 Received: from mga01.intel.com ([192.55.52.88]:3431 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762165AbZLPOmS (ORCPT ); Wed, 16 Dec 2009 09:42:18 -0500 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 16 Dec 2009 06:35:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.47,406,1257148800"; d="scan'208";a="756730130" Received: from yakui_zhao.sh.intel.com (HELO localhost.localdomain) ([10.239.13.17]) by fmsmga001.fm.intel.com with ESMTP; 16 Dec 2009 06:42:12 -0800 From: yakui.zhao@intel.com To: lenb@kernel.org Cc: linux-acpi@vger.kernel.org, minyard@acm.org, openipmi-developer@sourceforege.net, Zhao Yakui , Bjorn Helgaas Subject: [PATCH 1/3] ipmi/acpi: Fix the building error in ipmi module Date: Wed, 16 Dec 2009 22:40:29 +0800 Message-Id: <1260974431-4330-1-git-send-email-yakui.zhao@intel.com> X-Mailer: git-send-email 1.5.4.5 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c index 8dd0f37..8eebbe4 100644 --- a/drivers/pnp/pnpacpi/core.c +++ b/drivers/pnp/pnpacpi/core.c @@ -155,6 +155,13 @@ struct pnp_protocol pnpacpi_protocol = { #endif }; +struct acpi_device *pnp_acpi_device(struct pnp_dev *dev) +{ + if (dev->protocol == &pnpacpi_protocol) + return dev->data; + return NULL; +} +EXPORT_SYMBOL_GPL(pnp_acpi_device); static int __init pnpacpi_add_device(struct acpi_device *device) { acpi_handle temp = NULL; diff --git a/include/linux/pnp.h b/include/linux/pnp.h index 7c4193e..0ae2c64 100644 --- a/include/linux/pnp.h +++ b/include/linux/pnp.h @@ -335,16 +335,11 @@ extern struct pnp_protocol pnpbios_protocol; #endif #ifdef CONFIG_PNPACPI -extern struct pnp_protocol pnpacpi_protocol; -static inline struct acpi_device *pnp_acpi_device(struct pnp_dev *dev) -{ - if (dev->protocol == &pnpacpi_protocol) - return dev->data; - return NULL; -} +extern struct acpi_device *pnp_acpi_device(struct pnp_dev *dev); #else -#define pnp_acpi_device(dev) 0 +static inline struct acpi_device *pnp_acpi_device(struct pnp_dev *dev) +{ return NULL; } #endif /* status */