From: Viresh Kumar Date: Wed, 20 May 2015 11:26:46 +0000 (+0530) Subject: greybus: gpbridge: rename gpb.c to gpbridge.c X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f5db53b4c764ca4d1b1f1ca2bea5e276fc3befe1;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git greybus: gpbridge: rename gpb.c to gpbridge.c That's what followed for .h, etc.. Rename for better consistency. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/Makefile b/drivers/staging/greybus/Makefile index e636fe01f033..e5cae29d5a32 100644 --- a/drivers/staging/greybus/Makefile +++ b/drivers/staging/greybus/Makefile @@ -10,7 +10,7 @@ greybus-y := core.o \ protocol.o \ operation.o -gb-phy-y := gpb.o \ +gb-phy-y := gpbridge.o \ sdio.o \ uart.o \ pwm.o \ diff --git a/drivers/staging/greybus/gpb.c b/drivers/staging/greybus/gpb.c deleted file mode 100644 index 2324270e5c55..000000000000 --- a/drivers/staging/greybus/gpb.c +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Greybus GP Bridge driver - * - * Copyright 2014 Google Inc. - * Copyright 2014 Linaro Ltd. - * - * Released under the GPLv2 only. - */ - -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - -#include -#include -#include -#include -#include -#include - -#include "greybus.h" - - -static int __init gpbridge_init(void) -{ - if (gb_gpio_protocol_init()) { - pr_err("error initializing gpio protocol\n"); - goto error_gpio; - } - if (gb_pwm_protocol_init()) { - pr_err("error initializing pwm protocol\n"); - goto error_pwm; - } - if (gb_uart_protocol_init()) { - pr_err("error initializing uart protocol\n"); - goto error_uart; - } - if (gb_sdio_protocol_init()) { - pr_err("error initializing sdio protocol\n"); - goto error_sdio; - } - if (gb_usb_protocol_init()) { - pr_err("error initializing usb protocol\n"); - goto error_usb; - } - if (gb_i2c_protocol_init()) { - pr_err("error initializing i2c protocol\n"); - goto error_i2c; - } - if (gb_spi_protocol_init()) { - pr_err("error initializing spi protocol\n"); - goto error_spi; - } - if (gb_hid_protocol_init()) { - pr_err("error initializing hid protocol\n"); - goto error_hid; - } - if (gb_audio_protocol_init()) { - pr_err("error initializing audio protocols\n"); - goto error_audio; - } - - return 0; - -error_audio: - gb_hid_protocol_exit(); -error_hid: - gb_spi_protocol_exit(); -error_spi: - gb_i2c_protocol_exit(); -error_i2c: - gb_usb_protocol_exit(); -error_usb: - gb_sdio_protocol_exit(); -error_sdio: - gb_uart_protocol_exit(); -error_uart: - gb_pwm_protocol_exit(); -error_pwm: - gb_gpio_protocol_exit(); -error_gpio: - return -EPROTO; -} -module_init(gpbridge_init); - -static void __exit gpbridge_exit(void) -{ - gb_audio_protocol_exit(); - gb_hid_protocol_exit(); - gb_spi_protocol_exit(); - gb_i2c_protocol_exit(); - gb_usb_protocol_exit(); - gb_sdio_protocol_exit(); - gb_uart_protocol_exit(); - gb_pwm_protocol_exit(); - gb_gpio_protocol_exit(); -} -module_exit(gpbridge_exit); - -MODULE_LICENSE("GPL v2"); diff --git a/drivers/staging/greybus/gpbridge.c b/drivers/staging/greybus/gpbridge.c new file mode 100644 index 000000000000..2324270e5c55 --- /dev/null +++ b/drivers/staging/greybus/gpbridge.c @@ -0,0 +1,98 @@ +/* + * Greybus GP Bridge driver + * + * Copyright 2014 Google Inc. + * Copyright 2014 Linaro Ltd. + * + * Released under the GPLv2 only. + */ + +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + +#include +#include +#include +#include +#include +#include + +#include "greybus.h" + + +static int __init gpbridge_init(void) +{ + if (gb_gpio_protocol_init()) { + pr_err("error initializing gpio protocol\n"); + goto error_gpio; + } + if (gb_pwm_protocol_init()) { + pr_err("error initializing pwm protocol\n"); + goto error_pwm; + } + if (gb_uart_protocol_init()) { + pr_err("error initializing uart protocol\n"); + goto error_uart; + } + if (gb_sdio_protocol_init()) { + pr_err("error initializing sdio protocol\n"); + goto error_sdio; + } + if (gb_usb_protocol_init()) { + pr_err("error initializing usb protocol\n"); + goto error_usb; + } + if (gb_i2c_protocol_init()) { + pr_err("error initializing i2c protocol\n"); + goto error_i2c; + } + if (gb_spi_protocol_init()) { + pr_err("error initializing spi protocol\n"); + goto error_spi; + } + if (gb_hid_protocol_init()) { + pr_err("error initializing hid protocol\n"); + goto error_hid; + } + if (gb_audio_protocol_init()) { + pr_err("error initializing audio protocols\n"); + goto error_audio; + } + + return 0; + +error_audio: + gb_hid_protocol_exit(); +error_hid: + gb_spi_protocol_exit(); +error_spi: + gb_i2c_protocol_exit(); +error_i2c: + gb_usb_protocol_exit(); +error_usb: + gb_sdio_protocol_exit(); +error_sdio: + gb_uart_protocol_exit(); +error_uart: + gb_pwm_protocol_exit(); +error_pwm: + gb_gpio_protocol_exit(); +error_gpio: + return -EPROTO; +} +module_init(gpbridge_init); + +static void __exit gpbridge_exit(void) +{ + gb_audio_protocol_exit(); + gb_hid_protocol_exit(); + gb_spi_protocol_exit(); + gb_i2c_protocol_exit(); + gb_usb_protocol_exit(); + gb_sdio_protocol_exit(); + gb_uart_protocol_exit(); + gb_pwm_protocol_exit(); + gb_gpio_protocol_exit(); +} +module_exit(gpbridge_exit); + +MODULE_LICENSE("GPL v2");