diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-05-16 16:37:11 -0400 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2013-06-05 17:06:47 -0400 |
commit | aa6bce5319a54c050af26e095287472854abccfd (patch) | |
tree | 9de9ce8d15224a60072f28056a8d5f2493d198b6 /drivers/i2c | |
parent | 0c195afb8741c32974266ba7c964481ba418b4b5 (diff) |
I2C: mv64xxx: remove I2C_M_NOSTART code
As this driver does not advertise protocol mangling support
(I2C_FUNC_PROTOCOL_MANGLING is not set), having code to act on
I2C_M_NOSTART is illogical, and in any case isn't supportable on
anything but the first message - which makes no sense. Remove
the I2C_M_NOSTART code.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Mark A. Greer <mgreer@animalcreek.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-mv64xxx.c | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c index 4b45c7363501..f11cb25c3295 100644 --- a/drivers/i2c/busses/i2c-mv64xxx.c +++ b/drivers/i2c/busses/i2c-mv64xxx.c | |||
@@ -419,28 +419,12 @@ mv64xxx_i2c_execute_msg(struct mv64xxx_i2c_data *drv_data, struct i2c_msg *msg, | |||
419 | spin_lock_irqsave(&drv_data->lock, flags); | 419 | spin_lock_irqsave(&drv_data->lock, flags); |
420 | mv64xxx_i2c_prepare_for_io(drv_data, msg); | 420 | mv64xxx_i2c_prepare_for_io(drv_data, msg); |
421 | 421 | ||
422 | if (unlikely(msg->flags & I2C_M_NOSTART)) { /* Skip start/addr phases */ | 422 | if (is_first) { |
423 | if (drv_data->msg->flags & I2C_M_RD) { | 423 | drv_data->action = MV64XXX_I2C_ACTION_SEND_START; |
424 | /* No action to do, wait for slave to send a byte */ | 424 | drv_data->state = MV64XXX_I2C_STATE_WAITING_FOR_START_COND; |
425 | drv_data->action = MV64XXX_I2C_ACTION_CONTINUE; | ||
426 | drv_data->state = | ||
427 | MV64XXX_I2C_STATE_WAITING_FOR_SLAVE_DATA; | ||
428 | } else { | ||
429 | drv_data->action = MV64XXX_I2C_ACTION_SEND_DATA; | ||
430 | drv_data->state = | ||
431 | MV64XXX_I2C_STATE_WAITING_FOR_SLAVE_ACK; | ||
432 | drv_data->bytes_left--; | ||
433 | } | ||
434 | } else { | 425 | } else { |
435 | if (is_first) { | 426 | drv_data->action = MV64XXX_I2C_ACTION_SEND_ADDR_1; |
436 | drv_data->action = MV64XXX_I2C_ACTION_SEND_START; | 427 | drv_data->state = MV64XXX_I2C_STATE_WAITING_FOR_ADDR_1_ACK; |
437 | drv_data->state = | ||
438 | MV64XXX_I2C_STATE_WAITING_FOR_START_COND; | ||
439 | } else { | ||
440 | drv_data->action = MV64XXX_I2C_ACTION_SEND_ADDR_1; | ||
441 | drv_data->state = | ||
442 | MV64XXX_I2C_STATE_WAITING_FOR_ADDR_1_ACK; | ||
443 | } | ||
444 | } | 428 | } |
445 | 429 | ||
446 | drv_data->send_stop = is_last; | 430 | drv_data->send_stop = is_last; |