diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-05-31 07:47:48 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-06-04 13:39:19 -0400 |
commit | f5d8ee3f15dd71837ca672c3743b1bca5a0c013a (patch) | |
tree | 4788bec3fe5720d4fa112a4388a4b88b6050c6ab /drivers/spi/spi-topcliff-pch.c | |
parent | d683b96b072dc4680fc74964eca77e6a23d1fa6e (diff) |
spi: spi-topcliff-pch: Fix sparse warnings
Fixes the following type of warnings:
drivers/spi/spi-topcliff-pch.c:370:52: warning:
Using plain integer as NULL pointer
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-topcliff-pch.c')
-rw-r--r-- | drivers/spi/spi-topcliff-pch.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c index 35f60bd252dd..0c8071a618c5 100644 --- a/drivers/spi/spi-topcliff-pch.c +++ b/drivers/spi/spi-topcliff-pch.c | |||
@@ -367,7 +367,7 @@ static irqreturn_t pch_spi_handler(int irq, void *dev_id) | |||
367 | 367 | ||
368 | if (reg_spsr_val & SPSR_ORF_BIT) { | 368 | if (reg_spsr_val & SPSR_ORF_BIT) { |
369 | dev_err(&board_dat->pdev->dev, "%s Over run error\n", __func__); | 369 | dev_err(&board_dat->pdev->dev, "%s Over run error\n", __func__); |
370 | if (data->current_msg->complete != 0) { | 370 | if (data->current_msg->complete) { |
371 | data->transfer_complete = true; | 371 | data->transfer_complete = true; |
372 | data->current_msg->status = -EIO; | 372 | data->current_msg->status = -EIO; |
373 | data->current_msg->complete(data->current_msg->context); | 373 | data->current_msg->complete(data->current_msg->context); |
@@ -659,7 +659,7 @@ static void pch_spi_set_tx(struct pch_spi_data *data, int *bpw) | |||
659 | list_for_each_entry_safe(pmsg, tmp, data->queue.next, queue) { | 659 | list_for_each_entry_safe(pmsg, tmp, data->queue.next, queue) { |
660 | pmsg->status = -ENOMEM; | 660 | pmsg->status = -ENOMEM; |
661 | 661 | ||
662 | if (pmsg->complete != 0) | 662 | if (pmsg->complete) |
663 | pmsg->complete(pmsg->context); | 663 | pmsg->complete(pmsg->context); |
664 | 664 | ||
665 | /* delete from queue */ | 665 | /* delete from queue */ |
@@ -709,7 +709,7 @@ static void pch_spi_nomore_transfer(struct pch_spi_data *data) | |||
709 | * [To the spi core..indicating end of transfer] */ | 709 | * [To the spi core..indicating end of transfer] */ |
710 | data->current_msg->status = 0; | 710 | data->current_msg->status = 0; |
711 | 711 | ||
712 | if (data->current_msg->complete != 0) { | 712 | if (data->current_msg->complete) { |
713 | dev_dbg(&data->master->dev, | 713 | dev_dbg(&data->master->dev, |
714 | "%s:Invoking callback of SPI core\n", __func__); | 714 | "%s:Invoking callback of SPI core\n", __func__); |
715 | data->current_msg->complete(data->current_msg->context); | 715 | data->current_msg->complete(data->current_msg->context); |
@@ -1202,7 +1202,7 @@ static void pch_spi_process_messages(struct work_struct *pwork) | |||
1202 | list_for_each_entry_safe(pmsg, tmp, data->queue.next, queue) { | 1202 | list_for_each_entry_safe(pmsg, tmp, data->queue.next, queue) { |
1203 | pmsg->status = -EIO; | 1203 | pmsg->status = -EIO; |
1204 | 1204 | ||
1205 | if (pmsg->complete != 0) { | 1205 | if (pmsg->complete) { |
1206 | spin_unlock(&data->lock); | 1206 | spin_unlock(&data->lock); |
1207 | pmsg->complete(pmsg->context); | 1207 | pmsg->complete(pmsg->context); |
1208 | spin_lock(&data->lock); | 1208 | spin_lock(&data->lock); |