diff options
author | Johan Hovold <johan@hovoldconsulting.com> | 2015-11-25 15:59:02 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2015-11-25 15:27:06 -0800 |
commit | 2adaefb1458f67b3f71111fcf6a15670ab64101d (patch) | |
tree | be7543e200dffec38c62dfebdb87b5aedfc96acd /drivers/staging/greybus/greybus.h | |
parent | greybus: bundle: add bundle_id attribute (diff) | |
download | linux-dev-2adaefb1458f67b3f71111fcf6a15670ab64101d.tar.xz linux-dev-2adaefb1458f67b3f71111fcf6a15670ab64101d.zip |
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.h | 6 |
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; |