summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/driver.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/driver.h b/include/driver.h
index 2cf0190699..68e4bf559e 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -275,13 +275,21 @@ int device_add_resource(struct device *dev, const char *resname,
int device_add_data(struct device *dev, const void *data, size_t size);
+struct device *add_child_device(struct device *parent,
+ const char* devname, int id, const char *resname,
+ resource_size_t start, resource_size_t size, unsigned int flags,
+ void *pdata);
+
/*
* register a generic device
* with only one resource
*/
-struct device *add_generic_device(const char* devname, int id, const char *resname,
+static inline struct device *add_generic_device(const char* devname, int id, const char *resname,
resource_size_t start, resource_size_t size, unsigned int flags,
- void *pdata);
+ void *pdata)
+{
+ return add_child_device(NULL, devname, id, resname, start, size, flags, pdata);
+}
/*
* register a generic device