diff options
author | Edward O'Callaghan <eocallaghan@alterapraxis.com> | 2014-06-17 20:13:08 +1000 |
---|---|---|
committer | Patrick Georgi <patrick@georgi-clan.de> | 2014-06-25 11:34:05 +0200 |
commit | b57fef9f3e2b3cb8d8c8c5a3552c94a28ff81d15 (patch) | |
tree | cbc071f1b5b0f1e9db6458ede866ba76072c86fa /src/ec/lenovo/pmh7 | |
parent | 0ddb82671cae52571e92b7b22cf088939d887d50 (diff) |
src/ec: Sanitize headers and comment #endif pairings
Comment #endif /* FOO */ pairings.
Alphabetise headers and remove any #if CONFIG_ guards around them.
Background rational:
Remove guarding the inclusion of headers based on CONFIG_ options. This
*potentially* could hide issues such as functions being swapped from
under our feet, since different runtime behaviour could be declared with
the same function same name and type-signature. Hence, depending on the
header we happen to get may change runtime behaviour.
Change-Id: Ic61bdfb64d99f0e2998c6451ae6686915b7bb3d4
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-on: http://review.coreboot.org/6059
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Diffstat (limited to 'src/ec/lenovo/pmh7')
-rw-r--r-- | src/ec/lenovo/pmh7/chip.h | 3 | ||||
-rw-r--r-- | src/ec/lenovo/pmh7/pmh7.c | 7 | ||||
-rw-r--r-- | src/ec/lenovo/pmh7/pmh7.h | 3 |
3 files changed, 6 insertions, 7 deletions
diff --git a/src/ec/lenovo/pmh7/chip.h b/src/ec/lenovo/pmh7/chip.h index 4198f6660e..40a4956131 100644 --- a/src/ec/lenovo/pmh7/chip.h +++ b/src/ec/lenovo/pmh7/chip.h @@ -24,4 +24,5 @@ struct ec_lenovo_pmh7_config { int backlight_enable:1; int dock_event_enable:1; }; -#endif + +#endif /* EC_LENOVO_PMH7_CHIP_H */ diff --git a/src/ec/lenovo/pmh7/pmh7.c b/src/ec/lenovo/pmh7/pmh7.c index a4d0ccc466..cb0e27b89b 100644 --- a/src/ec/lenovo/pmh7/pmh7.c +++ b/src/ec/lenovo/pmh7/pmh7.c @@ -19,16 +19,13 @@ #include <arch/io.h> #include <console/console.h> -#ifndef __PRE_RAM__ -#ifndef __SMM__ #include <device/device.h> #include <device/pnp.h> -#endif -#endif #include <stdlib.h> +#include <pc80/mc146818rtc.h> + #include "pmh7.h" #include "chip.h" -#include <pc80/mc146818rtc.h> void pmh7_backlight_enable(int onoff) { diff --git a/src/ec/lenovo/pmh7/pmh7.h b/src/ec/lenovo/pmh7/pmh7.h index 4cd9535b7b..fb68408a7b 100644 --- a/src/ec/lenovo/pmh7/pmh7.h +++ b/src/ec/lenovo/pmh7/pmh7.h @@ -36,4 +36,5 @@ void pmh7_dock_event_enable(int onoff); void pmh7_touchpad_enable(int onoff); void pmh7_ultrabay_power_enable(int onoff); void pmh7_trackpoint_enable(int onoff); -#endif + +#endif /* EC_LENOVO_PMH7_H */ |