summaryrefslogtreecommitdiff
path: root/src/ec/compal
diff options
context:
space:
mode:
authorEdward O'Callaghan <eocallaghan@alterapraxis.com>2014-11-29 00:03:03 +1100
committerEdward O'Callaghan <eocallaghan@alterapraxis.com>2014-11-29 14:04:35 +0100
commit5f19eb6f402e3fa5c095d275f6483cf61edfb59b (patch)
tree69e642c88c3409ccb261de9a1fc3f7d59655854a /src/ec/compal
parentd3060edce222a372e3935ff6c270479815aafbe4 (diff)
downloadcoreboot-5f19eb6f402e3fa5c095d275f6483cf61edfb59b.tar.xz
ec: Use DEVICE_NOOP macro formalism over static stub func
The in source comment: /* This function avoids an error on serial console. */ refers to the resource allocator needing to find a non-NULL function pointer else complaints of "... missing read_resources" will be spewed. Unfortunately/fortunately (depending on the time of day) compiler optimisers have gotten a bit better at optimising away no-op functions leading to the very message these stubs attempted to avoid. By using the DEVICE_NOOP formalism that is static inlined 'suggests' (not enforces) to the compiler to keep these symbols around. Change-Id: I182019627b6954a4020f9f70e9c829ce3135f63c Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-on: http://review.coreboot.org/7598 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/ec/compal')
-rw-r--r--src/ec/compal/ene932/ec.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/ec/compal/ene932/ec.c b/src/ec/compal/ene932/ec.c
index 4bf6727afc..91c979e456 100644
--- a/src/ec/compal/ene932/ec.c
+++ b/src/ec/compal/ene932/ec.c
@@ -142,22 +142,10 @@ static void ene932_init(struct device *dev)
}
-
-static void ene932_read_resources(struct device *dev)
-{
- /* This function avoids an error on serial console. */
-}
-
-
-static void ene932_enable_resources(struct device *dev)
-{
- /* This function avoids an error on serial console. */
-}
-
static struct device_operations ops = {
.init = ene932_init,
- .read_resources = ene932_read_resources,
- .enable_resources = ene932_enable_resources
+ .read_resources = DEVICE_NOOP,
+ .enable_resources = DEVICE_NOOP,
};
static struct pnp_info pnp_dev_info[] = {