summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-04-15 16:02:02 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-04-15 16:11:26 +0200
commitdbd4e1166ead4579e959a3c799a22fa2780d845d (patch)
tree335c328ce31fc33d5ef2c0c48405835b1e613369 /include
parent9d699b790cfc3afa6766a1d047def724cc42386e (diff)
downloadbarebox-dbd4e1166ead4579e959a3c799a22fa2780d845d.tar.gz
device: make singular devices possible
Currently all devices have an id meaning that all devicenames end with a number. This patch adds a DEVICE_ID_SINGLE to make it ppossible to register a device without an id assigned to it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/driver.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/driver.h b/include/driver.h
index 3762027..4efa964 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -126,6 +126,11 @@ struct driver_d {
#define RW_SIZE(x) (x)
#define RW_SIZE_MASK 0x7
+/* dynamically assign the next free id */
+#define DEVICE_ID_DYNAMIC -1
+/* do not use an id (only one device available */
+#define DEVICE_ID_SINGLE -2
+
/* Register devices and drivers.
*/
int register_driver(struct driver_d *);