aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/spi/spi_s3c24xx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c
index 34bfb7dd7764..0885cc357a37 100644
--- a/drivers/spi/spi_s3c24xx.c
+++ b/drivers/spi/spi_s3c24xx.c
@@ -125,10 +125,10 @@ static int s3c24xx_spi_setupxfer(struct spi_device *spi,
125 /* is clk = pclk / (2 * (pre+1)), or is it 125 /* is clk = pclk / (2 * (pre+1)), or is it
126 * clk = (pclk * 2) / ( pre + 1) */ 126 * clk = (pclk * 2) / ( pre + 1) */
127 127
128 div = (div / 2) - 1; 128 div /= 2;
129 129
130 if (div < 0) 130 if (div > 0)
131 div = 1; 131 div -= 1;
132 132
133 if (div > 255) 133 if (div > 255)
134 div = 255; 134 div = 255;