aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorAnton Vorontsov <avorontsov@ru.mvista.com>2009-06-18 19:49:05 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-19 19:46:04 -0400
commit9effb959dee0919991362541048479d94bd1f6e0 (patch)
tree30fe48ebbda5673fcc53bc3775108f5d6645a510 /drivers/spi
parentd2998c2c3608e6c674f9079b661583927fbe61b0 (diff)
spi_mpc83xx: fix checkpatch issues
Checkpatch is spitting errors when seeing the rename patch, so fix the errors prior to moving. Following errors and warnings were fixed: WARNING: Use #include <linux/io.h> instead of <asm/io.h> #1027: FILE: drivers/spi/spi_mpc8xxx.c:37: +#include <asm/io.h> ERROR: "foo * bar" should be "foo *bar" #1111: FILE: drivers/spi/spi_mpc8xxx.c:121: +static inline void mpc83xx_spi_write_reg(__be32 __iomem * reg, u32 val) ERROR: "foo * bar" should be "foo *bar" #1116: FILE: drivers/spi/spi_mpc8xxx.c:126: +static inline u32 mpc83xx_spi_read_reg(__be32 __iomem * reg) ERROR: "foo * bar" should be "foo *bar" #1125: FILE: drivers/spi/spi_mpc8xxx.c:135: + type * rx = mpc83xx_spi->rx; \ ERROR: "foo * bar" should be "foo *bar" #1135: FILE: drivers/spi/spi_mpc8xxx.c:145: + const type * tx = mpc83xx_spi->tx; \ WARNING: suspect code indent for conditional statements (16, 25) #1504: FILE: drivers/spi/spi_mpc8xxx.c:514: + while (((event = [...] + cpu_relax(); Following warnings were left over, since fixing them will hurt the readability. We'd better fix them by lowering the indentation level by splitting mpc83xx_spi_work function into two parts. WARNING: line over 80 characters #1371: FILE: drivers/spi/spi_mpc8xxx.c:381: + status = mpc83xx_spi_setup_transfer(spi, t); WARNING: line over 80 characters #1392: FILE: drivers/spi/spi_mpc8xxx.c:402: + mpc83xx_spi_chipselect(spi, BITBANG_CS_INACTIVE); Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Cc: Kumar Gala <galak@gate.crashing.org> Cc: David Brownell <david-b@pacbell.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi_mpc83xx.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/spi/spi_mpc83xx.c b/drivers/spi/spi_mpc83xx.c
index 6e0232e65a38..273940d3938d 100644
--- a/drivers/spi/spi_mpc83xx.c
+++ b/drivers/spi/spi_mpc83xx.c
@@ -17,6 +17,7 @@
17#include <linux/bug.h> 17#include <linux/bug.h>
18#include <linux/errno.h> 18#include <linux/errno.h>
19#include <linux/err.h> 19#include <linux/err.h>
20#include <linux/io.h>
20#include <linux/completion.h> 21#include <linux/completion.h>
21#include <linux/interrupt.h> 22#include <linux/interrupt.h>
22#include <linux/delay.h> 23#include <linux/delay.h>
@@ -34,7 +35,6 @@
34 35
35#include <sysdev/fsl_soc.h> 36#include <sysdev/fsl_soc.h>
36#include <asm/irq.h> 37#include <asm/irq.h>
37#include <asm/io.h>
38 38
39/* SPI Controller registers */ 39/* SPI Controller registers */
40struct mpc83xx_spi_reg { 40struct mpc83xx_spi_reg {
@@ -118,12 +118,12 @@ struct spi_mpc83xx_cs {
118 u32 hw_mode; /* Holds HW mode register settings */ 118 u32 hw_mode; /* Holds HW mode register settings */
119}; 119};
120 120
121static inline void mpc83xx_spi_write_reg(__be32 __iomem * reg, u32 val) 121static inline void mpc83xx_spi_write_reg(__be32 __iomem *reg, u32 val)
122{ 122{
123 out_be32(reg, val); 123 out_be32(reg, val);
124} 124}
125 125
126static inline u32 mpc83xx_spi_read_reg(__be32 __iomem * reg) 126static inline u32 mpc83xx_spi_read_reg(__be32 __iomem *reg)
127{ 127{
128 return in_be32(reg); 128 return in_be32(reg);
129} 129}
@@ -132,7 +132,7 @@ static inline u32 mpc83xx_spi_read_reg(__be32 __iomem * reg)
132static \ 132static \
133void mpc83xx_spi_rx_buf_##type(u32 data, struct mpc83xx_spi *mpc83xx_spi) \ 133void mpc83xx_spi_rx_buf_##type(u32 data, struct mpc83xx_spi *mpc83xx_spi) \
134{ \ 134{ \
135 type * rx = mpc83xx_spi->rx; \ 135 type *rx = mpc83xx_spi->rx; \
136 *rx++ = (type)(data >> mpc83xx_spi->rx_shift); \ 136 *rx++ = (type)(data >> mpc83xx_spi->rx_shift); \
137 mpc83xx_spi->rx = rx; \ 137 mpc83xx_spi->rx = rx; \
138} 138}
@@ -142,7 +142,7 @@ static \
142u32 mpc83xx_spi_tx_buf_##type(struct mpc83xx_spi *mpc83xx_spi) \ 142u32 mpc83xx_spi_tx_buf_##type(struct mpc83xx_spi *mpc83xx_spi) \
143{ \ 143{ \
144 u32 data; \ 144 u32 data; \
145 const type * tx = mpc83xx_spi->tx; \ 145 const type *tx = mpc83xx_spi->tx; \
146 if (!tx) \ 146 if (!tx) \
147 return 0; \ 147 return 0; \
148 data = *tx++ << mpc83xx_spi->tx_shift; \ 148 data = *tx++ << mpc83xx_spi->tx_shift; \
@@ -500,7 +500,7 @@ static irqreturn_t mpc83xx_spi_irq(s32 irq, void *context_data)
500 while (((event = 500 while (((event =
501 mpc83xx_spi_read_reg(&mpc83xx_spi->base->event)) & 501 mpc83xx_spi_read_reg(&mpc83xx_spi->base->event)) &
502 SPIE_NF) == 0) 502 SPIE_NF) == 0)
503 cpu_relax(); 503 cpu_relax();
504 504
505 mpc83xx_spi->count -= 1; 505 mpc83xx_spi->count -= 1;
506 if (mpc83xx_spi->count) { 506 if (mpc83xx_spi->count) {