diff options
author | Greg Kroah-Hartman <gregkh@google.com> | 2015-12-22 18:21:51 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-01-12 11:11:49 -0800 |
commit | ed4596e9b19104ccc1e87bde8fcadee3a473c101 (patch) | |
tree | 9d2467879c261da5e43c2b90da3d0620757ba60e /drivers/staging/greybus/hd.c | |
parent | greybus: power_supply: fix use after free of power supply (diff) | |
download | linux-dev-ed4596e9b19104ccc1e87bde8fcadee3a473c101.tar.xz linux-dev-ed4596e9b19104ccc1e87bde8fcadee3a473c101.zip |
greybus: host: provide "generic" apbridge output calls
Provide a new function, gb_hd_output() to send data to the apbridge.
This is useful for the camera and audio drivers that need to do this
type of messaging.
The camera driver is converted to use this new function, the audio
driver can use it when it gets merged later.
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Tested-by: Mark Greer <mgreer@animalcreek.com>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Diffstat (limited to 'drivers/staging/greybus/hd.c')
-rw-r--r-- | drivers/staging/greybus/hd.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/staging/greybus/hd.c b/drivers/staging/greybus/hd.c index bff6861b8af7..b11a63644235 100644 --- a/drivers/staging/greybus/hd.c +++ b/drivers/staging/greybus/hd.c @@ -17,6 +17,15 @@ static struct ida gb_hd_bus_id_map; +int gb_hd_output(struct gb_host_device *hd, void *req, u16 size, u8 cmd, + bool async) +{ + if (!hd || !hd->driver || !hd->driver->output) + return -EINVAL; + return hd->driver->output(hd, req, size, cmd, async); +} +EXPORT_SYMBOL_GPL(gb_hd_output); + static void gb_hd_release(struct device *dev) { struct gb_host_device *hd = to_gb_host_device(dev); |