Skip to content

Commit

Permalink
Merge branch 'spi/merge' of git://git.secretlab.ca/git/linux-2.6
Browse files Browse the repository at this point in the history
* 'spi/merge' of git://git.secretlab.ca/git/linux-2.6:
  dt/fsldma: fix build warning caused by of_platform_device changes
  spi: Fix race condition in stop_queue()
  gpio/pch_gpio: Fix output value of pch_gpio_direction_output()
  gpio/ml_ioh_gpio: Fix output value of ioh_gpio_direction_output()
  gpio/pca953x: fix error handling path in probe() call
  • Loading branch information
Linus Torvalds committed Apr 11, 2011
2 parents b42282e + 8faa7cf commit 6b98cd5
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion drivers/dma/fsldma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1448,7 +1448,7 @@ static const struct of_device_id fsldma_of_ids[] = {
{}
};

static struct of_platform_driver fsldma_of_driver = {
static struct platform_driver fsldma_of_driver = {
.driver = {
.name = "fsl-elo-dma",
.owner = THIS_MODULE,
Expand Down
1 change: 1 addition & 0 deletions drivers/gpio/ml_ioh_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ static int ioh_gpio_direction_output(struct gpio_chip *gpio, unsigned nr,
reg_val |= (1 << nr);
else
reg_val &= ~(1 << nr);
iowrite32(reg_val, &chip->reg->regs[chip->ch].po);

mutex_unlock(&chip->lock);

Expand Down
5 changes: 3 additions & 2 deletions drivers/gpio/pca953x.c
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ static int __devinit pca953x_probe(struct i2c_client *client,

ret = gpiochip_add(&chip->gpio_chip);
if (ret)
goto out_failed;
goto out_failed_irq;

if (pdata->setup) {
ret = pdata->setup(client, chip->gpio_chip.base,
Expand All @@ -570,8 +570,9 @@ static int __devinit pca953x_probe(struct i2c_client *client,
i2c_set_clientdata(client, chip);
return 0;

out_failed:
out_failed_irq:
pca953x_irq_teardown(chip);
out_failed:
kfree(chip->dyn_pdata);
kfree(chip);
return ret;
Expand Down
1 change: 1 addition & 0 deletions drivers/gpio/pch_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ static int pch_gpio_direction_output(struct gpio_chip *gpio, unsigned nr,
reg_val |= (1 << nr);
else
reg_val &= ~(1 << nr);
iowrite32(reg_val, &chip->reg->po);

mutex_unlock(&chip->lock);

Expand Down
2 changes: 1 addition & 1 deletion drivers/spi/amba-pl022.c
Original file line number Diff line number Diff line change
Expand Up @@ -1555,7 +1555,7 @@ static int stop_queue(struct pl022 *pl022)
* A wait_queue on the pl022->busy could be used, but then the common
* execution path (pump_messages) would be required to call wake_up or
* friends on every SPI message. Do this instead */
while (!list_empty(&pl022->queue) && pl022->busy && limit--) {
while ((!list_empty(&pl022->queue) || pl022->busy) && limit--) {
spin_unlock_irqrestore(&pl022->queue_lock, flags);
msleep(10);
spin_lock_irqsave(&pl022->queue_lock, flags);
Expand Down
2 changes: 1 addition & 1 deletion drivers/spi/dw_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ static int stop_queue(struct dw_spi *dws)

spin_lock_irqsave(&dws->lock, flags);
dws->run = QUEUE_STOPPED;
while (!list_empty(&dws->queue) && dws->busy && limit--) {
while ((!list_empty(&dws->queue) || dws->busy) && limit--) {
spin_unlock_irqrestore(&dws->lock, flags);
msleep(10);
spin_lock_irqsave(&dws->lock, flags);
Expand Down
2 changes: 1 addition & 1 deletion drivers/spi/pxa2xx_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1493,7 +1493,7 @@ static int stop_queue(struct driver_data *drv_data)
* execution path (pump_messages) would be required to call wake_up or
* friends on every SPI message. Do this instead */
drv_data->run = QUEUE_STOPPED;
while (!list_empty(&drv_data->queue) && drv_data->busy && limit--) {
while ((!list_empty(&drv_data->queue) || drv_data->busy) && limit--) {
spin_unlock_irqrestore(&drv_data->lock, flags);
msleep(10);
spin_lock_irqsave(&drv_data->lock, flags);
Expand Down
2 changes: 1 addition & 1 deletion drivers/spi/spi_bfin5xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,7 @@ static inline int bfin_spi_stop_queue(struct bfin_spi_master_data *drv_data)
* friends on every SPI message. Do this instead
*/
drv_data->running = false;
while (!list_empty(&drv_data->queue) && drv_data->busy && limit--) {
while ((!list_empty(&drv_data->queue) || drv_data->busy) && limit--) {
spin_unlock_irqrestore(&drv_data->lock, flags);
msleep(10);
spin_lock_irqsave(&drv_data->lock, flags);
Expand Down

0 comments on commit 6b98cd5

Please sign in to comment.