aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/atmel_spi.c
diff options
context:
space:
mode:
authorTony Jones <tonyj@suse.de>2007-10-16 04:27:48 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 12:43:10 -0400
commit49dce689ad4ef0fd1f970ef762168e4bd46f69a3 (patch)
treee9e6d07c704118d82a638ae1f01a7ef5b59dd68b /drivers/spi/atmel_spi.c
parentcd58310d775fc10cc820b27c10f619187b8c4133 (diff)
spi doesn't need class_device
Make the SPI framework and drivers stop using class_device. Update docs accordingly ... highlighting just which sysfs paths should be "safe"/stable. Signed-off-by: Tony Jones <tonyj@suse.de> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/spi/atmel_spi.c')
-rw-r--r--drivers/spi/atmel_spi.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
index b0469749310a..0d342dcdd302 100644
--- a/drivers/spi/atmel_spi.c
+++ b/drivers/spi/atmel_spi.c
@@ -211,7 +211,7 @@ static void atmel_spi_next_message(struct spi_master *master)
211 msg = list_entry(as->queue.next, struct spi_message, queue); 211 msg = list_entry(as->queue.next, struct spi_message, queue);
212 spi = msg->spi; 212 spi = msg->spi;
213 213
214 dev_dbg(master->cdev.dev, "start message %p for %s\n", 214 dev_dbg(master->dev.parent, "start message %p for %s\n",
215 msg, spi->dev.bus_id); 215 msg, spi->dev.bus_id);
216 216
217 /* select chip if it's not still active */ 217 /* select chip if it's not still active */
@@ -266,10 +266,10 @@ static void atmel_spi_dma_unmap_xfer(struct spi_master *master,
266 struct spi_transfer *xfer) 266 struct spi_transfer *xfer)
267{ 267{
268 if (xfer->tx_dma != INVALID_DMA_ADDRESS) 268 if (xfer->tx_dma != INVALID_DMA_ADDRESS)
269 dma_unmap_single(master->cdev.dev, xfer->tx_dma, 269 dma_unmap_single(master->dev.parent, xfer->tx_dma,
270 xfer->len, DMA_TO_DEVICE); 270 xfer->len, DMA_TO_DEVICE);
271 if (xfer->rx_dma != INVALID_DMA_ADDRESS) 271 if (xfer->rx_dma != INVALID_DMA_ADDRESS)
272 dma_unmap_single(master->cdev.dev, xfer->rx_dma, 272 dma_unmap_single(master->dev.parent, xfer->rx_dma,
273 xfer->len, DMA_FROM_DEVICE); 273 xfer->len, DMA_FROM_DEVICE);
274} 274}
275 275
@@ -285,7 +285,7 @@ atmel_spi_msg_done(struct spi_master *master, struct atmel_spi *as,
285 list_del(&msg->queue); 285 list_del(&msg->queue);
286 msg->status = status; 286 msg->status = status;
287 287
288 dev_dbg(master->cdev.dev, 288 dev_dbg(master->dev.parent,
289 "xfer complete: %u bytes transferred\n", 289 "xfer complete: %u bytes transferred\n",
290 msg->actual_length); 290 msg->actual_length);
291 291
@@ -348,7 +348,7 @@ atmel_spi_interrupt(int irq, void *dev_id)
348 if (xfer->delay_usecs) 348 if (xfer->delay_usecs)
349 udelay(xfer->delay_usecs); 349 udelay(xfer->delay_usecs);
350 350
351 dev_warn(master->cdev.dev, "fifo overrun (%u/%u remaining)\n", 351 dev_warn(master->dev.parent, "fifo overrun (%u/%u remaining)\n",
352 spi_readl(as, TCR), spi_readl(as, RCR)); 352 spi_readl(as, TCR), spi_readl(as, RCR));
353 353
354 /* 354 /*
@@ -363,7 +363,7 @@ atmel_spi_interrupt(int irq, void *dev_id)
363 if (spi_readl(as, SR) & SPI_BIT(TXEMPTY)) 363 if (spi_readl(as, SR) & SPI_BIT(TXEMPTY))
364 break; 364 break;
365 if (!timeout) 365 if (!timeout)
366 dev_warn(master->cdev.dev, 366 dev_warn(master->dev.parent,
367 "timeout waiting for TXEMPTY"); 367 "timeout waiting for TXEMPTY");
368 while (spi_readl(as, SR) & SPI_BIT(RDRF)) 368 while (spi_readl(as, SR) & SPI_BIT(RDRF))
369 spi_readl(as, RDR); 369 spi_readl(as, RDR);
@@ -526,7 +526,7 @@ static int atmel_spi_transfer(struct spi_device *spi, struct spi_message *msg)
526 struct atmel_spi *as; 526 struct atmel_spi *as;
527 struct spi_transfer *xfer; 527 struct spi_transfer *xfer;
528 unsigned long flags; 528 unsigned long flags;
529 struct device *controller = spi->master->cdev.dev; 529 struct device *controller = spi->master->dev.parent;
530 530
531 as = spi_master_get_devdata(spi->master); 531 as = spi_master_get_devdata(spi->master);
532 532