public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
Cc: wsa@the-dreams.de, grant.likely@linaro.org,
	linux-i2c@vger.kernel.org, devicetree@vger.kernel.org,
	linus.walleij@linaro.org, Lee Jones <lee.jones@linaro.org>,
	Lv Zheng <lv.zheng@intel.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	linux-acpi@vger.kernel.org, devel@acpica.org
Subject: [PATCH 1/7] ACPICA: Only include ACPI asm files if ACPI is enabled
Date: Wed,  4 Jun 2014 13:09:50 +0100	[thread overview]
Message-ID: <1401883796-17841-2-git-send-email-lee.jones@linaro.org> (raw)
In-Reply-To: <1401883796-17841-1-git-send-email-lee.jones@linaro.org>

Any drivers which support ACPI and Device Tree probing need to include
both respective header files.  Without this patch, if a driver is being
used on a platform which does not support ACPI and subsequently does not
have the config option enabled, but includes linux/acpi.h the build
breaks with:

  In file included from ../include/acpi/platform/acenv.h:150:0,
                   from ../include/acpi/acpi.h:56,
                   from ../include/linux/match.h:2,
                   from ../drivers/i2c/i2c-core.c:43:
  ../include/acpi/platform/aclinux.h:73:23:
   fatal error: asm/acenv.h: No such file or directory
   #include <asm/acenv.h>
                       ^
Cc: Lv Zheng <lv.zheng@intel.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: linux-acpi@vger.kernel.org
Cc: devel@acpica.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 include/acpi/platform/aclinux.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
index cd1f052..fdf7663 100644
--- a/include/acpi/platform/aclinux.h
+++ b/include/acpi/platform/aclinux.h
@@ -70,9 +70,10 @@
 #ifdef EXPORT_ACPI_INTERFACES
 #include <linux/export.h>
 #endif
-#include <asm/acenv.h>
 
-#ifndef CONFIG_ACPI
+#ifdef CONFIG_ACPI
+#include <asm/acenv.h>
+#else
 
 /* External globals for __KERNEL__, stubs is needed */
 
-- 
1.8.3.2

       reply	other threads:[~2014-06-04 12:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1401883796-17841-1-git-send-email-lee.jones@linaro.org>
2014-06-04 12:09 ` Lee Jones [this message]
     [not found]   ` <1401883796-17841-2-git-send-email-lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-06-04 12:35     ` [PATCH 1/7] ACPICA: Only include ACPI asm files if ACPI is enabled Rafael J. Wysocki
     [not found]       ` <3061297.feg5DGUjIt-sKB8Sp2ER+y1GS7QM15AGw@public.gmane.org>
2014-06-04 12:51         ` Lee Jones
2014-06-04 21:29           ` Rafael J. Wysocki
     [not found]             ` <1603851.9SBouhvdWS-sKB8Sp2ER+y1GS7QM15AGw@public.gmane.org>
2014-06-05  1:01               ` Zheng, Lv
2014-06-05  1:14           ` Zheng, Lv
     [not found]             ` <1AE640813FDE7649BE1B193DEA596E880262042C-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-06-05  4:11               ` Hanjun Guo
2014-06-05  4:46                 ` Zheng, Lv
2014-06-05  0:56   ` Zheng, Lv
2014-06-05  4:06     ` Hanjun Guo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1401883796-17841-2-git-send-email-lee.jones@linaro.org \
    --to=lee.jones@linaro.org \
    --cc=devel@acpica.org \
    --cc=devicetree@vger.kernel.org \
    --cc=grant.likely@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lv.zheng@intel.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox