Skip to content

Commit 58c9d61

Browse files
camusocminyard
authored andcommitted
ipmi: put acpi.h with the other headers
Enclosing '#include <linux/acpi.h>' within '#ifdef CONFIG_ACPI' is unnecessary, since it has its own conditional compile for CONFIG_ACPI. Commit 0fbcf4a ("ipmi: Convert the IPMI SI ACPI handling to a platform device") exposed this as a problem for platforms that do not support ACPI when it introduced a call to ACPI_PTR() macro outside of the CONFIG_ACPI conditional compile. This would have been perfectly acceptable if acpi.h were not conditionally excluded for the non-acpi platform, because the conditional compile within acpi.h defines ACPI_PTR() to return NULL when compiled for non acpi platforms. Signed-off-by: Tony Camuso <[email protected]> Fixed commit reference in header to conform to standard. Signed-off-by: Corey Minyard <[email protected]>
1 parent 30e4c9a commit 58c9d61

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/char/ipmi/ipmi_si_intf.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
#include <linux/of_platform.h>
6969
#include <linux/of_address.h>
7070
#include <linux/of_irq.h>
71+
#include <linux/acpi.h>
7172

7273
#ifdef CONFIG_PARISC
7374
#include <asm/hardware.h> /* for register_parisc_driver() stuff */
@@ -2054,8 +2055,6 @@ static int hardcode_find_bmc(void)
20542055

20552056
#ifdef CONFIG_ACPI
20562057

2057-
#include <linux/acpi.h>
2058-
20592058
/*
20602059
* Once we get an ACPI failure, we don't try any more, because we go
20612060
* through the tables sequentially. Once we don't find a table, there

0 commit comments

Comments
 (0)