From: sjg@chromium.org (Simon Glass)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/7] spi: s3c64xx: Fix enum dma_data_direction warning
Date: Tue, 18 Sep 2012 11:21:54 -0700 [thread overview]
Message-ID: <1347992519-6904-3-git-send-email-sjg@chromium.org> (raw)
In-Reply-To: <1347992519-6904-1-git-send-email-sjg@chromium.org>
While the effect is harmless, the SPI driver is actually using the wrong
enum and this generates warnings:
drivers/spi/spi-s3c64xx.c: In function 's3c64xx_spi_dmacb':
drivers/spi/spi-s3c64xx.c:268:21: warning: comparison between 'enum dma_data_direction' and 'enum dma_transfer_direction' [-Wenum-compare]
drivers/spi/spi-s3c64xx.c:277:21: warning: comparison between 'enum dma_data_direction' and 'enum dma_transfer_direction' [-Wenum-compare]
drivers/spi/spi-s3c64xx.c: In function 'prepare_dma':
drivers/spi/spi-s3c64xx.c:296:21: warning: comparison between 'enum dma_data_direction' and 'enum dma_transfer_direction' [-Wenum-compare]
Signed-off-by: Simon Glass <sjg@chromium.org>
---
drivers/spi/spi-s3c64xx.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 646a765..3152659 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -260,7 +260,7 @@ static void s3c64xx_spi_dmacb(void *data)
struct s3c64xx_spi_dma_data *dma = data;
unsigned long flags;
- if (dma->direction == DMA_DEV_TO_MEM)
+ if (dma->direction == DMA_FROM_DEVICE)
sdd = container_of(data,
struct s3c64xx_spi_driver_data, rx_dma);
else
@@ -269,7 +269,7 @@ static void s3c64xx_spi_dmacb(void *data)
spin_lock_irqsave(&sdd->lock, flags);
- if (dma->direction == DMA_DEV_TO_MEM) {
+ if (dma->direction == DMA_FROM_DEVICE) {
sdd->state &= ~RXBUSY;
if (!(sdd->state & TXBUSY))
complete(&sdd->xfer_completion);
@@ -289,7 +289,7 @@ static void prepare_dma(struct s3c64xx_spi_dma_data *dma,
struct samsung_dma_prep info;
struct samsung_dma_config config;
- if (dma->direction == DMA_DEV_TO_MEM) {
+ if (dma->direction == DMA_FROM_DEVICE) {
sdd = container_of((void *)dma,
struct s3c64xx_spi_driver_data, rx_dma);
config.direction = sdd->rx_dma.direction;
--
1.7.7.3
next prev parent reply other threads:[~2012-09-18 18:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-18 18:21 [PATCH 0/7] Add support for Exynos5 ISP SPI ports Simon Glass
2012-09-18 18:21 ` [PATCH 1/7] PM / Domains: add generic function 'pm_genpd_of_add_device_by_name' Simon Glass
2012-09-18 18:21 ` Simon Glass [this message]
2012-09-18 18:21 ` [PATCH 3/7] spi: s3c64xx: Add support for ISP SPI ports Simon Glass
2012-09-18 18:21 ` [PATCH 4/7] spi: s3c64xx: Use jiffies instead of loops for timeout Simon Glass
2012-09-18 18:21 ` [PATCH 5/7] spi: s3c64xx: Allow use with SPI ports without dma Simon Glass
2012-09-18 18:21 ` [PATCH 6/7] spi: s3c64xx: Tidy up SPI chip select handling Simon Glass
2012-09-18 18:21 ` [PATCH 7/7] spi: s3c64xx: Write to PACKET_CNT after reset Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1347992519-6904-3-git-send-email-sjg@chromium.org \
--to=sjg@chromium.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).