Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 74590
b: refs/heads/master
c: c24b260
h: refs/heads/master
v: v3
  • Loading branch information
Marc Pignat authored and Linus Torvalds committed Dec 5, 2007
1 parent 5c34eee commit 1974957
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 27 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9b938b749065d6a94172ac24d9748bd66a03da4c
refs/heads/master: c24b2602af88db4489c6c3fb4b2a8e47fb15769b
13 changes: 6 additions & 7 deletions trunk/drivers/input/touchscreen/ads7846.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,13 +267,12 @@ static int ads7846_read12_ser(struct device *dev, unsigned command)
ts->irq_disabled = 0;
enable_irq(spi->irq);

if (req->msg.status)
status = req->msg.status;

/* on-wire is a must-ignore bit, a BE12 value, then padding */
sample = be16_to_cpu(req->sample);
sample = sample >> 3;
sample &= 0x0fff;
if (status == 0) {
/* on-wire is a must-ignore bit, a BE12 value, then padding */
sample = be16_to_cpu(req->sample);
sample = sample >> 3;
sample &= 0x0fff;
}

kfree(req);
return status ? status : sample;
Expand Down
10 changes: 0 additions & 10 deletions trunk/drivers/mmc/host/mmc_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,6 @@ mmc_spi_readbytes(struct mmc_spi_host *host, unsigned len)
DMA_FROM_DEVICE);

status = spi_sync(host->spi, &host->readback);
if (status == 0)
status = host->readback.status;

if (host->dma_dev)
dma_sync_single_for_cpu(host->dma_dev,
Expand Down Expand Up @@ -480,8 +478,6 @@ mmc_spi_command_send(struct mmc_spi_host *host,
DMA_BIDIRECTIONAL);
}
status = spi_sync(host->spi, &host->m);
if (status == 0)
status = host->m.status;

if (host->dma_dev)
dma_sync_single_for_cpu(host->dma_dev,
Expand Down Expand Up @@ -624,8 +620,6 @@ mmc_spi_writeblock(struct mmc_spi_host *host, struct spi_transfer *t)
DMA_BIDIRECTIONAL);

status = spi_sync(spi, &host->m);
if (status == 0)
status = host->m.status;

if (status != 0) {
dev_dbg(&spi->dev, "write error (%d)\n", status);
Expand Down Expand Up @@ -726,8 +720,6 @@ mmc_spi_readblock(struct mmc_spi_host *host, struct spi_transfer *t)
}

status = spi_sync(spi, &host->m);
if (status == 0)
status = host->m.status;

if (host->dma_dev) {
dma_sync_single_for_cpu(host->dma_dev,
Expand Down Expand Up @@ -905,8 +897,6 @@ mmc_spi_data_do(struct mmc_spi_host *host, struct mmc_command *cmd,
DMA_BIDIRECTIONAL);

tmp = spi_sync(spi, &host->m);
if (tmp == 0)
tmp = host->m.status;

if (host->dma_dev)
dma_sync_single_for_cpu(host->dma_dev,
Expand Down
12 changes: 3 additions & 9 deletions trunk/drivers/rtc/rtc-max6902.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,9 @@ static int max6902_get_reg(struct device *dev, unsigned char address,

/* do the i/o */
status = spi_sync(spi, &message);
if (status == 0)
status = message.status;
else
return status;

*data = chip->rx_buf[1];

if (status == 0)
*data = chip->rx_buf[1];
return status;
}

Expand Down Expand Up @@ -125,9 +121,7 @@ static int max6902_get_datetime(struct device *dev, struct rtc_time *dt)

/* do the i/o */
status = spi_sync(spi, &message);
if (status == 0)
status = message.status;
else
if (status)
return status;

/* The chip sends data in this order:
Expand Down

0 comments on commit 1974957

Please sign in to comment.