[coreboot-gerrit] Patch set updated for coreboot: 92e7c2c include/device/device.h: Provide DEVICE_NOOP macro shim

Edward O'Callaghan (eocallaghan@alterapraxis.com) gerrit at coreboot.org
Fri Oct 31 00:28:19 CET 2014


Edward O'Callaghan (eocallaghan at alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7283

-gerrit

commit 92e7c2c1a8914b8d064fc47635621d9a5dd0a1a2
Author: Edward O'Callaghan <eocallaghan at alterapraxis.com>
Date:   Fri Oct 31 08:31:44 2014 +1100

    include/device/device.h: Provide DEVICE_NOOP macro shim
    
    Rather than everyone writing their own adhoc device operation
    NOP shim, we provide some formalism. We later make use of this
    to reduce the loc count down trivially.
    
    Change-Id: I2d04bfb50e76f367a0ee258dab97d7caa12ec99e
    Signed-off-by: Edward O'Callaghan <eocallaghan at alterapraxis.com>
---
 src/include/device/device.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/include/device/device.h b/src/include/device/device.h
index 3810716..21c8b70 100644
--- a/src/include/device/device.h
+++ b/src/include/device/device.h
@@ -66,6 +66,12 @@ struct device_operations {
 	const struct pnp_mode_ops *ops_pnp_mode;
 };
 
+/**
+ * Standard device operations function pointers shims.
+ */
+static inline void device_noop(struct device *) {}
+#define DEVICE_NOOP device_noop
+
 #endif /* ! __SIMPLE_DEVICE__ */
 
 



More information about the coreboot-gerrit mailing list