]> asedeno.scripts.mit.edu Git - linux.git/commit
greybus: firmware: convert to bundle driver
authorJohan Hovold <johan@hovoldconsulting.com>
Fri, 29 Jan 2016 14:42:31 +0000 (15:42 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Tue, 2 Feb 2016 01:52:20 +0000 (17:52 -0800)
commit8ec589b9796eebfa266d2b047ee2318541814e28
tree6e4b821bd77f9a507bc7e1ebaabf5c5e038038f6
parentc760442e1cafef30de20ea5b64074d70efa6eec2
greybus: firmware: convert to bundle driver

Convert the legacy firmware protocol driver to a bundle driver.

This also fixes a potential crash should a (malicious) module have sent
an early request before the private data had been initialised.

Note that the firmware protocol needs to support the version request
indefinitely since it has been burnt into ROM.

In order to avoid having to update current module-loading scripts, keep
this driver internal to greybus core at least until modalias support is
added.

Note that there is no MODULE_DEVICE_TABLE defined for firmware as we
cannot have two greybus tables in one module on ancient 3.10 kernels and
that the legacy driver is currently also internal to core. This needs be
added once the driver can be built as a module.

Testing Done: Tested on DB3.

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/core.c
drivers/staging/greybus/firmware.c
drivers/staging/greybus/firmware.h
drivers/staging/greybus/greybus.h
drivers/staging/greybus/greybus_protocols.h
drivers/staging/greybus/legacy.c