aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Sperl <kernel@martin.sperl.org>2015-03-20 10:26:11 -0400
committerMark Brown <broonie@kernel.org>2015-03-20 13:45:35 -0400
commit342f948a166c2a17b0e187e3fc2618dc561842f3 (patch)
treef6f6d9c150df51ea7aaf4d3cd694f53b8fa3c15d
parentc517d838eb7d07bbe9507871fab3931deccff539 (diff)
spi: bcm2835: fix all checkpath --strict messages
The following errors/warnings issued by checkpatch.pl --strict have been fixed: drivers/spi/spi-bcm2835.c:182: CHECK: Alignment should match open parenthesis drivers/spi/spi-bcm2835.c:191: CHECK: braces {} should be used on all arms of this statement drivers/spi/spi-bcm2835.c:234: CHECK: Alignment should match open parenthesis drivers/spi/spi-bcm2835.c:256: CHECK: Alignment should match open parenthesis drivers/spi/spi-bcm2835.c:271: CHECK: Alignment should match open parenthesis drivers/spi/spi-bcm2835.c:346: CHECK: Alignment should match open parenthesis total: 0 errors, 0 warnings, 6 checks, 403 lines checked In 2 locations the arguments had to get split/moved to the next line so that the line width stays below 80 chars. Signed-off-by: Martin Sperl <kernel@martin.sperl.org> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--drivers/spi/spi-bcm2835.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/spi/spi-bcm2835.c b/drivers/spi/spi-bcm2835.c
index 419a782ab6d5..779d3a86c3cb 100644
--- a/drivers/spi/spi-bcm2835.c
+++ b/drivers/spi/spi-bcm2835.c
@@ -179,7 +179,7 @@ static irqreturn_t bcm2835_spi_interrupt(int irq, void *dev_id)
179} 179}
180 180
181static int bcm2835_spi_start_transfer(struct spi_device *spi, 181static int bcm2835_spi_start_transfer(struct spi_device *spi,
182 struct spi_transfer *tfr) 182 struct spi_transfer *tfr)
183{ 183{
184 struct bcm2835_spi *bs = spi_master_get_devdata(spi->master); 184 struct bcm2835_spi *bs = spi_master_get_devdata(spi->master);
185 unsigned long spi_hz, clk_hz, cdiv; 185 unsigned long spi_hz, clk_hz, cdiv;
@@ -196,8 +196,9 @@ static int bcm2835_spi_start_transfer(struct spi_device *spi,
196 196
197 if (cdiv >= 65536) 197 if (cdiv >= 65536)
198 cdiv = 0; /* 0 is the slowest we can go */ 198 cdiv = 0; /* 0 is the slowest we can go */
199 } else 199 } else {
200 cdiv = 0; /* 0 is the slowest we can go */ 200 cdiv = 0; /* 0 is the slowest we can go */
201 }
201 202
202 if (spi->mode & SPI_CPOL) 203 if (spi->mode & SPI_CPOL)
203 cs |= BCM2835_SPI_CS_CPOL; 204 cs |= BCM2835_SPI_CS_CPOL;
@@ -231,7 +232,8 @@ static int bcm2835_spi_start_transfer(struct spi_device *spi,
231} 232}
232 233
233static int bcm2835_spi_finish_transfer(struct spi_device *spi, 234static int bcm2835_spi_finish_transfer(struct spi_device *spi,
234 struct spi_transfer *tfr, bool cs_change) 235 struct spi_transfer *tfr,
236 bool cs_change)
235{ 237{
236 struct bcm2835_spi *bs = spi_master_get_devdata(spi->master); 238 struct bcm2835_spi *bs = spi_master_get_devdata(spi->master);
237 u32 cs = bcm2835_rd(bs, BCM2835_SPI_CS); 239 u32 cs = bcm2835_rd(bs, BCM2835_SPI_CS);
@@ -253,7 +255,7 @@ static int bcm2835_spi_finish_transfer(struct spi_device *spi,
253} 255}
254 256
255static int bcm2835_spi_transfer_one(struct spi_master *master, 257static int bcm2835_spi_transfer_one(struct spi_master *master,
256 struct spi_message *mesg) 258 struct spi_message *mesg)
257{ 259{
258 struct bcm2835_spi *bs = spi_master_get_devdata(master); 260 struct bcm2835_spi *bs = spi_master_get_devdata(master);
259 struct spi_transfer *tfr; 261 struct spi_transfer *tfr;
@@ -267,8 +269,10 @@ static int bcm2835_spi_transfer_one(struct spi_master *master,
267 if (err) 269 if (err)
268 goto out; 270 goto out;
269 271
270 timeout = wait_for_completion_timeout(&bs->done, 272 timeout = wait_for_completion_timeout(
271 msecs_to_jiffies(BCM2835_SPI_TIMEOUT_MS)); 273 &bs->done,
274 msecs_to_jiffies(BCM2835_SPI_TIMEOUT_MS)
275 );
272 if (!timeout) { 276 if (!timeout) {
273 err = -ETIMEDOUT; 277 err = -ETIMEDOUT;
274 goto out; 278 goto out;
@@ -343,7 +347,7 @@ static int bcm2835_spi_probe(struct platform_device *pdev)
343 clk_prepare_enable(bs->clk); 347 clk_prepare_enable(bs->clk);
344 348
345 err = devm_request_irq(&pdev->dev, bs->irq, bcm2835_spi_interrupt, 0, 349 err = devm_request_irq(&pdev->dev, bs->irq, bcm2835_spi_interrupt, 0,
346 dev_name(&pdev->dev), master); 350 dev_name(&pdev->dev), master);
347 if (err) { 351 if (err) {
348 dev_err(&pdev->dev, "could not request IRQ: %d\n", err); 352 dev_err(&pdev->dev, "could not request IRQ: %d\n", err);
349 goto out_clk_disable; 353 goto out_clk_disable;