diff options
author | Bryan Wu <bryan.wu@analog.com> | 2008-02-06 04:38:17 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-06 13:41:11 -0500 |
commit | 8d20d0a7c470cda37db6765866df6338f51ead0f (patch) | |
tree | 62694bcfce58eb9de6811f945395783e57727dfa /drivers/spi/spi_bfin5xx.c | |
parent | ccc7baed1868efd02dac88b32cba4a837a558536 (diff) |
spi_bfin: remove useless fault path
Remove useless return status check in restore_state function. Issue was
pointed out by Michael.
Cc: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/spi/spi_bfin5xx.c')
-rw-r--r-- | drivers/spi/spi_bfin5xx.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c index 61cc5e0c2cbb..84c158a3af2d 100644 --- a/drivers/spi/spi_bfin5xx.c +++ b/drivers/spi/spi_bfin5xx.c | |||
@@ -223,10 +223,9 @@ static void cs_deactive(struct driver_data *drv_data, struct chip_data *chip) | |||
223 | #define MAX_SPI_SSEL 7 | 223 | #define MAX_SPI_SSEL 7 |
224 | 224 | ||
225 | /* stop controller and re-config current chip*/ | 225 | /* stop controller and re-config current chip*/ |
226 | static int restore_state(struct driver_data *drv_data) | 226 | static void restore_state(struct driver_data *drv_data) |
227 | { | 227 | { |
228 | struct chip_data *chip = drv_data->cur_chip; | 228 | struct chip_data *chip = drv_data->cur_chip; |
229 | int ret = 0; | ||
230 | 229 | ||
231 | /* Clear status and disable clock */ | 230 | /* Clear status and disable clock */ |
232 | write_STAT(drv_data, BIT_STAT_CLR); | 231 | write_STAT(drv_data, BIT_STAT_CLR); |
@@ -239,13 +238,6 @@ static int restore_state(struct driver_data *drv_data) | |||
239 | 238 | ||
240 | bfin_spi_enable(drv_data); | 239 | bfin_spi_enable(drv_data); |
241 | cs_active(drv_data, chip); | 240 | cs_active(drv_data, chip); |
242 | |||
243 | if (ret) | ||
244 | dev_dbg(&drv_data->pdev->dev, | ||
245 | ": request chip select number %d failed\n", | ||
246 | chip->chip_select_num); | ||
247 | |||
248 | return ret; | ||
249 | } | 241 | } |
250 | 242 | ||
251 | /* used to kick off transfer in rx mode */ | 243 | /* used to kick off transfer in rx mode */ |
@@ -978,10 +970,7 @@ static void pump_messages(struct work_struct *work) | |||
978 | 970 | ||
979 | /* Setup the SSP using the per chip configuration */ | 971 | /* Setup the SSP using the per chip configuration */ |
980 | drv_data->cur_chip = spi_get_ctldata(drv_data->cur_msg->spi); | 972 | drv_data->cur_chip = spi_get_ctldata(drv_data->cur_msg->spi); |
981 | if (restore_state(drv_data)) { | 973 | restore_state(drv_data); |
982 | spin_unlock_irqrestore(&drv_data->lock, flags); | ||
983 | return; | ||
984 | }; | ||
985 | 974 | ||
986 | list_del_init(&drv_data->cur_msg->queue); | 975 | list_del_init(&drv_data->cur_msg->queue); |
987 | 976 | ||