[coreboot-gerrit] New patch to review for coreboot: 9e49cee include/device/device.h: Provide DEVICE_NOOP macro shim

Edward O'Callaghan (eocallaghan@alterapraxis.com) gerrit at coreboot.org
Thu Oct 30 23:06: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 9e49cee73392790ef62408140f95ce69a6eacb02
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 | 5 +++++
 1 file changed, 5 insertions(+)

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



More information about the coreboot-gerrit mailing list