aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi_bitbang.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-08-16 13:42:58 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-08-16 13:42:58 -0400
commite4862f2f6f5653dfb67f3ba2b6f0bc74516ed51a (patch)
tree1db5a0540a4eecfad9b7daee476b985e82ddc810 /drivers/spi/spi_bitbang.c
parentec62dbd7eb8e3dddb221da89ecbcea0fc3dee8c1 (diff)
parentb2c1e07b81a126e5846dfc3d36f559d861df59f4 (diff)
Merge branch 'for-2.6.36' into for-2.6.37
Fairly simple conflicts, the most serious ones are the i.MX ones which I suspect now need another rename. Conflicts: arch/arm/mach-mx2/clock_imx27.c arch/arm/mach-mx2/devices.c arch/arm/mach-omap2/board-rx51-peripherals.c arch/arm/mach-omap2/board-zoom2.c sound/soc/fsl/mpc5200_dma.c sound/soc/fsl/mpc5200_dma.h sound/soc/fsl/mpc8610_hpcd.c sound/soc/pxa/spitz.c
Diffstat (limited to 'drivers/spi/spi_bitbang.c')
-rw-r--r--drivers/spi/spi_bitbang.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/spi/spi_bitbang.c b/drivers/spi/spi_bitbang.c
index 5265330a528f..8b55724d5f39 100644
--- a/drivers/spi/spi_bitbang.c
+++ b/drivers/spi/spi_bitbang.c
@@ -259,7 +259,6 @@ static void bitbang_work(struct work_struct *work)
259 struct spi_bitbang *bitbang = 259 struct spi_bitbang *bitbang =
260 container_of(work, struct spi_bitbang, work); 260 container_of(work, struct spi_bitbang, work);
261 unsigned long flags; 261 unsigned long flags;
262 int do_setup = -1;
263 int (*setup_transfer)(struct spi_device *, 262 int (*setup_transfer)(struct spi_device *,
264 struct spi_transfer *); 263 struct spi_transfer *);
265 264
@@ -275,6 +274,7 @@ static void bitbang_work(struct work_struct *work)
275 unsigned tmp; 274 unsigned tmp;
276 unsigned cs_change; 275 unsigned cs_change;
277 int status; 276 int status;
277 int do_setup = -1;
278 278
279 m = container_of(bitbang->queue.next, struct spi_message, 279 m = container_of(bitbang->queue.next, struct spi_message,
280 queue); 280 queue);
@@ -307,6 +307,8 @@ static void bitbang_work(struct work_struct *work)
307 status = setup_transfer(spi, t); 307 status = setup_transfer(spi, t);
308 if (status < 0) 308 if (status < 0)
309 break; 309 break;
310 if (do_setup == -1)
311 do_setup = 0;
310 } 312 }
311 313
312 /* set up default clock polarity, and activate chip; 314 /* set up default clock polarity, and activate chip;
@@ -367,11 +369,6 @@ static void bitbang_work(struct work_struct *work)
367 m->status = status; 369 m->status = status;
368 m->complete(m->context); 370 m->complete(m->context);
369 371
370 /* restore speed and wordsize if it was overridden */
371 if (do_setup == 1)
372 setup_transfer(spi, NULL);
373 do_setup = 0;
374
375 /* normally deactivate chipselect ... unless no error and 372 /* normally deactivate chipselect ... unless no error and
376 * cs_change has hinted that the next message will probably 373 * cs_change has hinted that the next message will probably
377 * be for this chip too. 374 * be for this chip too.