Skip to content

Commit d9721ae

Browse files
AxelLinbroonie
authored andcommitted
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>
1 parent 38dbfb5 commit d9721ae

5 files changed

Lines changed: 7 additions & 12 deletions

File tree

‎drivers/spi/spi-bitbang.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -467,11 +467,9 @@ EXPORT_SYMBOL_GPL(spi_bitbang_start);
467467
/**
468468
* spi_bitbang_stop - stops the task providing spi communication
469469
*/
470-
int spi_bitbang_stop(struct spi_bitbang *bitbang)
470+
void spi_bitbang_stop(struct spi_bitbang *bitbang)
471471
{
472472
spi_unregister_master(bitbang->master);
473-
474-
return 0;
475473
}
476474
EXPORT_SYMBOL_GPL(spi_bitbang_stop);
477475

‎drivers/spi/spi-butterfly.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,6 @@ static void butterfly_attach(struct parport *p)
309309
static void butterfly_detach(struct parport *p)
310310
{
311311
struct butterfly *pp;
312-
int status;
313312

314313
/* FIXME this global is ugly ... but, how to quickly get from
315314
* the parport to the "struct butterfly" associated with it?
@@ -321,7 +320,7 @@ static void butterfly_detach(struct parport *p)
321320
butterfly = NULL;
322321

323322
/* stop() unregisters child devices too */
324-
status = spi_bitbang_stop(&pp->bitbang);
323+
spi_bitbang_stop(&pp->bitbang);
325324

326325
/* turn off VCC */
327326
parport_write_data(pp->port, 0);

‎drivers/spi/spi-gpio.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -503,13 +503,12 @@ static int spi_gpio_remove(struct platform_device *pdev)
503503
{
504504
struct spi_gpio *spi_gpio;
505505
struct spi_gpio_platform_data *pdata;
506-
int status;
507506

508507
spi_gpio = platform_get_drvdata(pdev);
509508
pdata = dev_get_platdata(&pdev->dev);
510509

511510
/* stop() unregisters child devices too */
512-
status = spi_bitbang_stop(&spi_gpio->bitbang);
511+
spi_bitbang_stop(&spi_gpio->bitbang);
513512

514513
if (SPI_MISO_GPIO != SPI_GPIO_NO_MISO)
515514
gpio_free(SPI_MISO_GPIO);
@@ -518,7 +517,7 @@ static int spi_gpio_remove(struct platform_device *pdev)
518517
gpio_free(SPI_SCK_GPIO);
519518
spi_master_put(spi_gpio->bitbang.master);
520519

521-
return status;
520+
return 0;
522521
}
523522

524523
MODULE_ALIAS("platform:" DRIVER_NAME);

‎drivers/spi/spi-omap-uwire.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -539,14 +539,13 @@ static int uwire_probe(struct platform_device *pdev)
539539
static int uwire_remove(struct platform_device *pdev)
540540
{
541541
struct uwire_spi *uwire = platform_get_drvdata(pdev);
542-
int status;
543542

544543
// FIXME remove all child devices, somewhere ...
545544

546-
status = spi_bitbang_stop(&uwire->bitbang);
545+
spi_bitbang_stop(&uwire->bitbang);
547546
uwire_off(uwire);
548547
iounmap(uwire_base);
549-
return status;
548+
return 0;
550549
}
551550

552551
/* work with hotplug and coldplug */

‎include/linux/spi/spi_bitbang.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ extern int spi_bitbang_setup_transfer(struct spi_device *spi,
4242

4343
/* start or stop queue processing */
4444
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);
4646

4747
#endif /* __SPI_BITBANG_H */

0 commit comments

Comments
 (0)