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>
This commit is contained in:
Axel Lin 2014-03-29 18:50:12 +08:00 committed by Mark Brown
parent 38dbfb59d1
commit d9721ae149
5 changed files with 7 additions and 12 deletions

View File

@ -467,11 +467,9 @@ EXPORT_SYMBOL_GPL(spi_bitbang_start);
/** /**
* spi_bitbang_stop - stops the task providing spi communication * spi_bitbang_stop - stops the task providing spi communication
*/ */
int spi_bitbang_stop(struct spi_bitbang *bitbang) void spi_bitbang_stop(struct spi_bitbang *bitbang)
{ {
spi_unregister_master(bitbang->master); spi_unregister_master(bitbang->master);
return 0;
} }
EXPORT_SYMBOL_GPL(spi_bitbang_stop); EXPORT_SYMBOL_GPL(spi_bitbang_stop);

View File

@ -309,7 +309,6 @@ done:
static void butterfly_detach(struct parport *p) static void butterfly_detach(struct parport *p)
{ {
struct butterfly *pp; struct butterfly *pp;
int status;
/* FIXME this global is ugly ... but, how to quickly get from /* FIXME this global is ugly ... but, how to quickly get from
* the parport to the "struct butterfly" associated with it? * the parport to the "struct butterfly" associated with it?
@ -321,7 +320,7 @@ static void butterfly_detach(struct parport *p)
butterfly = NULL; butterfly = NULL;
/* stop() unregisters child devices too */ /* stop() unregisters child devices too */
status = spi_bitbang_stop(&pp->bitbang); spi_bitbang_stop(&pp->bitbang);
/* turn off VCC */ /* turn off VCC */
parport_write_data(pp->port, 0); parport_write_data(pp->port, 0);

View File

@ -503,13 +503,12 @@ static int spi_gpio_remove(struct platform_device *pdev)
{ {
struct spi_gpio *spi_gpio; struct spi_gpio *spi_gpio;
struct spi_gpio_platform_data *pdata; struct spi_gpio_platform_data *pdata;
int status;
spi_gpio = platform_get_drvdata(pdev); spi_gpio = platform_get_drvdata(pdev);
pdata = dev_get_platdata(&pdev->dev); pdata = dev_get_platdata(&pdev->dev);
/* stop() unregisters child devices too */ /* stop() unregisters child devices too */
status = spi_bitbang_stop(&spi_gpio->bitbang); spi_bitbang_stop(&spi_gpio->bitbang);
if (SPI_MISO_GPIO != SPI_GPIO_NO_MISO) if (SPI_MISO_GPIO != SPI_GPIO_NO_MISO)
gpio_free(SPI_MISO_GPIO); gpio_free(SPI_MISO_GPIO);
@ -518,7 +517,7 @@ static int spi_gpio_remove(struct platform_device *pdev)
gpio_free(SPI_SCK_GPIO); gpio_free(SPI_SCK_GPIO);
spi_master_put(spi_gpio->bitbang.master); spi_master_put(spi_gpio->bitbang.master);
return status; return 0;
} }
MODULE_ALIAS("platform:" DRIVER_NAME); MODULE_ALIAS("platform:" DRIVER_NAME);

View File

@ -539,14 +539,13 @@ static int uwire_probe(struct platform_device *pdev)
static int uwire_remove(struct platform_device *pdev) static int uwire_remove(struct platform_device *pdev)
{ {
struct uwire_spi *uwire = platform_get_drvdata(pdev); struct uwire_spi *uwire = platform_get_drvdata(pdev);
int status;
// FIXME remove all child devices, somewhere ... // FIXME remove all child devices, somewhere ...
status = spi_bitbang_stop(&uwire->bitbang); spi_bitbang_stop(&uwire->bitbang);
uwire_off(uwire); uwire_off(uwire);
iounmap(uwire_base); iounmap(uwire_base);
return status; return 0;
} }
/* work with hotplug and coldplug */ /* work with hotplug and coldplug */

View File

@ -42,6 +42,6 @@ extern int spi_bitbang_setup_transfer(struct spi_device *spi,
/* start or stop queue processing */ /* start or stop queue processing */
extern int spi_bitbang_start(struct spi_bitbang *spi); extern int spi_bitbang_start(struct spi_bitbang *spi);
extern int spi_bitbang_stop(struct spi_bitbang *spi); extern void spi_bitbang_stop(struct spi_bitbang *spi);
#endif /* __SPI_BITBANG_H */ #endif /* __SPI_BITBANG_H */