greybus: spi: add bridged-PHY spi protocol driver
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
diff --git a/drivers/staging/greybus/gpb.c b/drivers/staging/greybus/gpb.c
index 0776df6..5f080d4 100644
--- a/drivers/staging/greybus/gpb.c
+++ b/drivers/staging/greybus/gpb.c
@@ -45,8 +45,14 @@
pr_err("error initializing usb protocol\n");
goto error_i2c;
}
+ if (gb_spi_protocol_init()) {
+ pr_err("error initializing usb protocol\n");
+ goto error_spi;
+ }
return 0;
+error_spi:
+ gb_i2c_protocol_exit();
error_i2c:
gb_usb_protocol_exit();
error_usb:
@@ -63,6 +69,7 @@
static void __exit gpbridge_exit(void)
{
+ gb_spi_protocol_exit();
gb_i2c_protocol_exit();
gb_usb_protocol_exit();
gb_sdio_protocol_exit();