From 49dce689ad4ef0fd1f970ef762168e4bd46f69a3 Mon Sep 17 00:00:00 2001 From: Tony Jones Date: Tue, 16 Oct 2007 01:27:48 -0700 Subject: 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 Signed-off-by: David Brownell Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/spi/atmel_spi.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'drivers/spi/atmel_spi.c') 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) msg = list_entry(as->queue.next, struct spi_message, queue); spi = msg->spi; - dev_dbg(master->cdev.dev, "start message %p for %s\n", + dev_dbg(master->dev.parent, "start message %p for %s\n", msg, spi->dev.bus_id); /* select chip if it's not still active */ @@ -266,10 +266,10 @@ static void atmel_spi_dma_unmap_xfer(struct spi_master *master, struct spi_transfer *xfer) { if (xfer->tx_dma != INVALID_DMA_ADDRESS) - dma_unmap_single(master->cdev.dev, xfer->tx_dma, + dma_unmap_single(master->dev.parent, xfer->tx_dma, xfer->len, DMA_TO_DEVICE); if (xfer->rx_dma != INVALID_DMA_ADDRESS) - dma_unmap_single(master->cdev.dev, xfer->rx_dma, + dma_unmap_single(master->dev.parent, xfer->rx_dma, xfer->len, DMA_FROM_DEVICE); } @@ -285,7 +285,7 @@ atmel_spi_msg_done(struct spi_master *master, struct atmel_spi *as, list_del(&msg->queue); msg->status = status; - dev_dbg(master->cdev.dev, + dev_dbg(master->dev.parent, "xfer complete: %u bytes transferred\n", msg->actual_length); @@ -348,7 +348,7 @@ atmel_spi_interrupt(int irq, void *dev_id) if (xfer->delay_usecs) udelay(xfer->delay_usecs); - dev_warn(master->cdev.dev, "fifo overrun (%u/%u remaining)\n", + dev_warn(master->dev.parent, "fifo overrun (%u/%u remaining)\n", spi_readl(as, TCR), spi_readl(as, RCR)); /* @@ -363,7 +363,7 @@ atmel_spi_interrupt(int irq, void *dev_id) if (spi_readl(as, SR) & SPI_BIT(TXEMPTY)) break; if (!timeout) - dev_warn(master->cdev.dev, + dev_warn(master->dev.parent, "timeout waiting for TXEMPTY"); while (spi_readl(as, SR) & SPI_BIT(RDRF)) spi_readl(as, RDR); @@ -526,7 +526,7 @@ static int atmel_spi_transfer(struct spi_device *spi, struct spi_message *msg) struct atmel_spi *as; struct spi_transfer *xfer; unsigned long flags; - struct device *controller = spi->master->cdev.dev; + struct device *controller = spi->master->dev.parent; as = spi_master_get_devdata(spi->master); -- cgit v1.2.3