diff options
| author | Axel Lin <axel.lin@ingics.com> | 2014-03-29 06:50:12 -0400 |
|---|---|---|
| committer | Mark Brown <broonie@linaro.org> | 2014-03-29 07:09:26 -0400 |
| commit | d9721ae1493725bb14dcd1a3c19bbb5795e4a42f (patch) | |
| tree | c50e7c46d9181aefca4508b83c5fb1c4b0920869 | |
| parent | 38dbfb59d1175ef458d006556061adeaa8751b72 (diff) | |
spi: bitbang: Make spi_bitbang_stop() return void
spi_bitbang_stop() never fails, so make it return void.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
| -rw-r--r-- | drivers/spi/spi-bitbang.c | 4 | ||||
| -rw-r--r-- | drivers/spi/spi-butterfly.c | 3 | ||||
| -rw-r--r-- | drivers/spi/spi-gpio.c | 5 | ||||
| -rw-r--r-- | drivers/spi/spi-omap-uwire.c | 5 | ||||
| -rw-r--r-- | include/linux/spi/spi_bitbang.h | 2 |
5 files changed, 7 insertions, 12 deletions
diff --git a/drivers/spi/spi-bitbang.c b/drivers/spi/spi-bitbang.c index bd222f6b677d..67aead248753 100644 --- a/drivers/spi/spi-bitbang.c +++ b/drivers/spi/spi-bitbang.c | |||
| @@ -467,11 +467,9 @@ EXPORT_SYMBOL_GPL(spi_bitbang_start); | |||
| 467 | /** | 467 | /** |
| 468 | * spi_bitbang_stop - stops the task providing spi communication | 468 | * spi_bitbang_stop - stops the task providing spi communication |
| 469 | */ | 469 | */ |
| 470 | int spi_bitbang_stop(struct spi_bitbang *bitbang) | 470 | void spi_bitbang_stop(struct spi_bitbang *bitbang) |
| 471 | { | 471 | { |
| 472 | spi_unregister_master(bitbang->master); | 472 | spi_unregister_master(bitbang->master); |
| 473 | |||
| 474 | return 0; | ||
| 475 | } | 473 | } |
| 476 | EXPORT_SYMBOL_GPL(spi_bitbang_stop); | 474 | EXPORT_SYMBOL_GPL(spi_bitbang_stop); |
| 477 | 475 | ||
diff --git a/drivers/spi/spi-butterfly.c b/drivers/spi/spi-butterfly.c index 8081f96bd1d5..ee4f91ccd8fd 100644 --- a/drivers/spi/spi-butterfly.c +++ b/drivers/spi/spi-butterfly.c | |||
| @@ -309,7 +309,6 @@ done: | |||
| 309 | static void butterfly_detach(struct parport *p) | 309 | static void butterfly_detach(struct parport *p) |
| 310 | { | 310 | { |
| 311 | struct butterfly *pp; | 311 | struct butterfly *pp; |
| 312 | int status; | ||
| 313 | 312 | ||
| 314 | /* FIXME this global is ugly ... but, how to quickly get from | 313 | /* FIXME this global is ugly ... but, how to quickly get from |
| 315 | * the parport to the "struct butterfly" associated with it? | 314 | * the parport to the "struct butterfly" associated with it? |
| @@ -321,7 +320,7 @@ static void butterfly_detach(struct parport *p) | |||
| 321 | butterfly = NULL; | 320 | butterfly = NULL; |
| 322 | 321 | ||
| 323 | /* stop() unregisters child devices too */ | 322 | /* stop() unregisters child devices too */ |
| 324 | status = spi_bitbang_stop(&pp->bitbang); | 323 | spi_bitbang_stop(&pp->bitbang); |
| 325 | 324 | ||
| 326 | /* turn off VCC */ | 325 | /* turn off VCC */ |
| 327 | parport_write_data(pp->port, 0); | 326 | parport_write_data(pp->port, 0); |
diff --git a/drivers/spi/spi-gpio.c b/drivers/spi/spi-gpio.c index 7beeb29472ac..b189b958432b 100644 --- a/drivers/spi/spi-gpio.c +++ b/drivers/spi/spi-gpio.c | |||
| @@ -503,13 +503,12 @@ static int spi_gpio_remove(struct platform_device *pdev) | |||
| 503 | { | 503 | { |
| 504 | struct spi_gpio *spi_gpio; | 504 | struct spi_gpio *spi_gpio; |
| 505 | struct spi_gpio_platform_data *pdata; | 505 | struct spi_gpio_platform_data *pdata; |
| 506 | int status; | ||
| 507 | 506 | ||
| 508 | spi_gpio = platform_get_drvdata(pdev); | 507 | spi_gpio = platform_get_drvdata(pdev); |
| 509 | pdata = dev_get_platdata(&pdev->dev); | 508 | pdata = dev_get_platdata(&pdev->dev); |
| 510 | 509 | ||
| 511 | /* stop() unregisters child devices too */ | 510 | /* stop() unregisters child devices too */ |
| 512 | status = spi_bitbang_stop(&spi_gpio->bitbang); | 511 | spi_bitbang_stop(&spi_gpio->bitbang); |
| 513 | 512 | ||
| 514 | if (SPI_MISO_GPIO != SPI_GPIO_NO_MISO) | 513 | if (SPI_MISO_GPIO != SPI_GPIO_NO_MISO) |
| 515 | gpio_free(SPI_MISO_GPIO); | 514 | gpio_free(SPI_MISO_GPIO); |
| @@ -518,7 +517,7 @@ static int spi_gpio_remove(struct platform_device *pdev) | |||
| 518 | gpio_free(SPI_SCK_GPIO); | 517 | gpio_free(SPI_SCK_GPIO); |
| 519 | spi_master_put(spi_gpio->bitbang.master); | 518 | spi_master_put(spi_gpio->bitbang.master); |
| 520 | 519 | ||
| 521 | return status; | 520 | return 0; |
| 522 | } | 521 | } |
| 523 | 522 | ||
| 524 | MODULE_ALIAS("platform:" DRIVER_NAME); | 523 | MODULE_ALIAS("platform:" DRIVER_NAME); |
diff --git a/drivers/spi/spi-omap-uwire.c b/drivers/spi/spi-omap-uwire.c index 9313fd3b413d..a4d7bb557792 100644 --- a/drivers/spi/spi-omap-uwire.c +++ b/drivers/spi/spi-omap-uwire.c | |||
| @@ -539,14 +539,13 @@ static int uwire_probe(struct platform_device *pdev) | |||
| 539 | static int uwire_remove(struct platform_device *pdev) | 539 | static int uwire_remove(struct platform_device *pdev) |
| 540 | { | 540 | { |
| 541 | struct uwire_spi *uwire = platform_get_drvdata(pdev); | 541 | struct uwire_spi *uwire = platform_get_drvdata(pdev); |
| 542 | int status; | ||
| 543 | 542 | ||
| 544 | // FIXME remove all child devices, somewhere ... | 543 | // FIXME remove all child devices, somewhere ... |
| 545 | 544 | ||
| 546 | status = spi_bitbang_stop(&uwire->bitbang); | 545 | spi_bitbang_stop(&uwire->bitbang); |
| 547 | uwire_off(uwire); | 546 | uwire_off(uwire); |
| 548 | iounmap(uwire_base); | 547 | iounmap(uwire_base); |
| 549 | return status; | 548 | return 0; |
| 550 | } | 549 | } |
| 551 | 550 | ||
| 552 | /* work with hotplug and coldplug */ | 551 | /* work with hotplug and coldplug */ |
diff --git a/include/linux/spi/spi_bitbang.h b/include/linux/spi/spi_bitbang.h index daebaba886aa..85578d4be034 100644 --- a/include/linux/spi/spi_bitbang.h +++ b/include/linux/spi/spi_bitbang.h | |||
| @@ -42,6 +42,6 @@ extern int spi_bitbang_setup_transfer(struct spi_device *spi, | |||
| 42 | 42 | ||
| 43 | /* start or stop queue processing */ | 43 | /* start or stop queue processing */ |
| 44 | extern int spi_bitbang_start(struct spi_bitbang *spi); | 44 | extern int spi_bitbang_start(struct spi_bitbang *spi); |
| 45 | extern int spi_bitbang_stop(struct spi_bitbang *spi); | 45 | extern void spi_bitbang_stop(struct spi_bitbang *spi); |
| 46 | 46 | ||
| 47 | #endif /* __SPI_BITBANG_H */ | 47 | #endif /* __SPI_BITBANG_H */ |
