X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fspi%2Fspi_bitbang.c;h=24a330d82395a6e260c9ae5bdc7bb6132bb7c477;hb=a4d04a4cd9881e89fdc62107b6b57053438f2b30;hp=4638e6c8371591591ee5dcef6852558acca34e45;hpb=f2aca47dc3c2d0c2d5dbd972558557e74232bbce;p=linux-2.6-omap-h63xx.git diff --git a/drivers/spi/spi_bitbang.c b/drivers/spi/spi_bitbang.c index 4638e6c8371..24a330d8239 100644 --- a/drivers/spi/spi_bitbang.c +++ b/drivers/spi/spi_bitbang.c @@ -210,7 +210,7 @@ int spi_bitbang_setup(struct spi_device *spi) if (!cs->txrx_word) return -EINVAL; - retval = spi_bitbang_setup_transfer(spi, NULL); + retval = bitbang->setup_transfer(spi, NULL); if (retval < 0) return retval; @@ -238,7 +238,7 @@ EXPORT_SYMBOL_GPL(spi_bitbang_setup); /** * spi_bitbang_cleanup - default cleanup for per-word I/O loops */ -void spi_bitbang_cleanup(const struct spi_device *spi) +void spi_bitbang_cleanup(struct spi_device *spi) { kfree(spi->controller_state); } @@ -442,9 +442,10 @@ EXPORT_SYMBOL_GPL(spi_bitbang_transfer); * hardware that basically exposes a shift register) or per-spi_transfer * (which takes better advantage of hardware like fifos or DMA engines). * - * Drivers using per-word I/O loops should use (or call) spi_bitbang_setup and - * spi_bitbang_cleanup to handle those spi master methods. Those methods are - * the defaults if the bitbang->txrx_bufs routine isn't initialized. + * Drivers using per-word I/O loops should use (or call) spi_bitbang_setup, + * spi_bitbang_cleanup and spi_bitbang_setup_transfer to handle those spi + * master methods. Those methods are the defaults if the bitbang->txrx_bufs + * routine isn't initialized. * * This routine registers the spi_master, which will process requests in a * dedicated task, keeping IRQs unblocked most of the time. To stop @@ -479,7 +480,7 @@ int spi_bitbang_start(struct spi_bitbang *bitbang) /* this task is the only thing to touch the SPI bits */ bitbang->busy = 0; bitbang->workqueue = create_singlethread_workqueue( - bitbang->master->dev.parent->bus_id); + bitbang->master->cdev.dev->bus_id); if (bitbang->workqueue == NULL) { status = -EBUSY; goto err1; @@ -513,14 +514,14 @@ int spi_bitbang_stop(struct spi_bitbang *bitbang) while (!list_empty(&bitbang->queue) && limit--) { spin_unlock_irq(&bitbang->lock); - dev_dbg(&bitbang->master->dev, "wait for queue\n"); + dev_dbg(bitbang->master->cdev.dev, "wait for queue\n"); msleep(10); spin_lock_irq(&bitbang->lock); } spin_unlock_irq(&bitbang->lock); if (!list_empty(&bitbang->queue)) { - dev_err(&bitbang->master->dev, "queue didn't empty\n"); + dev_err(bitbang->master->cdev.dev, "queue didn't empty\n"); return -EBUSY; }