]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
pxa2xx_spi: fix build breakage
authorMike Rapoport <mike@compulab.co.il>
Wed, 1 Oct 2008 17:39:24 +0000 (10:39 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 9 Oct 2008 02:44:39 +0000 (19:44 -0700)
commit 20b918dc77b383e9779dafceee3f2198a6f7b0e5 upstream

This patch fixes a build error in the pxa2xx-spi driver,
introduced by commit 7e96445533ac3f4f7964646a202ff3620602fab4
("pxa2xx_spi: dma bugfixes")

  CC      drivers/spi/pxa2xx_spi.o
drivers/spi/pxa2xx_spi.c: In function 'map_dma_buffers':
drivers/spi/pxa2xx_spi.c:331: error: invalid operands to binary &
drivers/spi/pxa2xx_spi.c:331: error: invalid operands to binary &
drivers/spi/pxa2xx_spi.c: In function 'pump_transfers':
drivers/spi/pxa2xx_spi.c:897: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'unsigned int'

[dbrownell@users.sourceforge.net: fix warning too ]

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Acked-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/spi/pxa2xx_spi.c

index 996c8bc117ad2926a845f303d0e2889433af2023..1dcc79f83b2d7480c1f6ef2bef55da492ad5598d 100644 (file)
@@ -50,7 +50,7 @@ MODULE_ALIAS("platform:pxa2xx-spi");
 
 #define DMA_INT_MASK           (DCSR_ENDINTR | DCSR_STARTINTR | DCSR_BUSERR)
 #define RESET_DMA_CHANNEL      (DCSR_NODESC | DMA_INT_MASK)
-#define IS_DMA_ALIGNED(x)      (((x) & 0x07) == 0)
+#define IS_DMA_ALIGNED(x)      ((((u32)(x)) & 0x07) == 0)
 #define MAX_DMA_LEN            8191
 
 /*
@@ -893,7 +893,7 @@ static void pump_transfers(unsigned long data)
                                || transfer->rx_dma || transfer->tx_dma) {
                        dev_err(&drv_data->pdev->dev,
                                "pump_transfers: mapped transfer length "
-                               "of %lu is greater than %d\n",
+                               "of %u is greater than %d\n",
                                transfer->len, MAX_DMA_LEN);
                        message->status = -EINVAL;
                        giveback(drv_data);