summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/greybus.h
diff options
context:
space:
mode:
authorJohan Hovold <johan@hovoldconsulting.com>2015-11-25 15:59:02 +0100
committerGreg Kroah-Hartman <gregkh@google.com>2015-11-25 15:27:06 -0800
commit2adaefb1458f67b3f71111fcf6a15670ab64101d (patch)
treebe7543e200dffec38c62dfebdb87b5aedfc96acd /drivers/staging/greybus/greybus.h
parenta97015c9e99d8421b80cdf9652a456f4cd93fc1e (diff)
greybus: hd: make host device a device
Make the host device a proper device in the kernel device model. Host devices will be our new greybus-bus root devices. Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/greybus.h')
-rw-r--r--drivers/staging/greybus/greybus.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/staging/greybus/greybus.h b/drivers/staging/greybus/greybus.h
index 6da4e78248a8..8ef3a0426a09 100644
--- a/drivers/staging/greybus/greybus.h
+++ b/drivers/staging/greybus/greybus.h
@@ -104,11 +104,17 @@ struct dentry *gb_debugfs_get(void);
extern struct bus_type greybus_bus_type;
+extern struct device_type greybus_hd_type;
extern struct device_type greybus_endo_type;
extern struct device_type greybus_module_type;
extern struct device_type greybus_interface_type;
extern struct device_type greybus_bundle_type;
+static inline int is_gb_host_device(const struct device *dev)
+{
+ return dev->type == &greybus_hd_type;
+}
+
static inline int is_gb_endo(const struct device *dev)
{
return dev->type == &greybus_endo_type;