linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: wsa@the-dreams.de (Wolfram Sang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/5] i2c: mv64xxx: directly call send_start when initializing transfer
Date: Thu, 13 Feb 2014 21:36:32 +0100	[thread overview]
Message-ID: <1392323793-4125-5-git-send-email-wsa@the-dreams.de> (raw)
In-Reply-To: <1392323793-4125-1-git-send-email-wsa@the-dreams.de>

Calling the state machine with a definite state which is only used in
this context is superfluous. Do it directly.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
 drivers/i2c/busses/i2c-mv64xxx.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c
index 9c37b59..3af5266 100644
--- a/drivers/i2c/busses/i2c-mv64xxx.c
+++ b/drivers/i2c/busses/i2c-mv64xxx.c
@@ -97,7 +97,6 @@ enum {
 enum {
 	MV64XXX_I2C_ACTION_INVALID,
 	MV64XXX_I2C_ACTION_CONTINUE,
-	MV64XXX_I2C_ACTION_SEND_START,
 	MV64XXX_I2C_ACTION_SEND_RESTART,
 	MV64XXX_I2C_ACTION_OFFLOAD_RESTART,
 	MV64XXX_I2C_ACTION_SEND_ADDR_1,
@@ -467,10 +466,6 @@ mv64xxx_i2c_do_action(struct mv64xxx_i2c_data *drv_data)
 			drv_data->reg_base + drv_data->reg_offsets.control);
 		break;
 
-	case MV64XXX_I2C_ACTION_SEND_START:
-		mv64xxx_i2c_send_start(drv_data);
-		break;
-
 	case MV64XXX_I2C_ACTION_SEND_ADDR_1:
 		writel(drv_data->addr1,
 			drv_data->reg_base + drv_data->reg_offsets.data);
@@ -628,12 +623,11 @@ mv64xxx_i2c_execute_msg(struct mv64xxx_i2c_data *drv_data, struct i2c_msg *msg,
 
 	spin_lock_irqsave(&drv_data->lock, flags);
 
-	drv_data->action = MV64XXX_I2C_ACTION_SEND_START;
 	drv_data->state = MV64XXX_I2C_STATE_WAITING_FOR_START_COND;
 
 	drv_data->send_stop = is_last;
 	drv_data->block = 1;
-	mv64xxx_i2c_do_action(drv_data);
+	mv64xxx_i2c_send_start(drv_data);
 	spin_unlock_irqrestore(&drv_data->lock, flags);
 
 	mv64xxx_i2c_wait_for_completion(drv_data);
-- 
1.8.5.1

  parent reply	other threads:[~2014-02-13 20:36 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-07 10:55 [PATCH] i2c: mv64xxx: Fix locked bus when offload is selected but not used on a message Gregory CLEMENT
2014-02-07 15:09 ` Jason Cooper
2014-02-07 15:18   ` Gregory CLEMENT
2014-02-07 18:09   ` Kevin Hilman
2014-02-07 18:13     ` Jason Cooper
2014-02-08 17:01 ` Jason Cooper
2014-02-13  9:41 ` Wolfram Sang
2014-02-13 14:23   ` Gregory CLEMENT
2014-02-13 20:36   ` [PATCH 0/5] mv64xxx updates Wolfram Sang
2014-02-13 20:36     ` [PATCH 1/5] i2c: mv64xxx: put offload check into offload prepare function Wolfram Sang
2014-02-14 11:38       ` Gregory CLEMENT
2014-02-13 20:36     ` [PATCH 2/5] i2c: mv64xxx: refactor message start to ensure proper initialization Wolfram Sang
2014-02-14 11:39       ` Gregory CLEMENT
2014-02-15 14:44         ` Wolfram Sang
2014-02-13 20:36     ` [PATCH 3/5] i2c: mv64xxx: refactor send_start Wolfram Sang
2014-02-14 11:42       ` Gregory CLEMENT
2014-02-13 20:36     ` Wolfram Sang [this message]
2014-02-13 20:36     ` [PATCH 5/5] i2c: mv64xxx: refactor initialization for new msgs Wolfram Sang
2014-02-13 20:41     ` [PATCH 0/5] mv64xxx updates Gregory CLEMENT
2014-03-10 16:25       ` Wolfram Sang
2014-02-13 20:51     ` Thomas Petazzoni
2014-02-18 11:29       ` Maxime Ripard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1392323793-4125-5-git-send-email-wsa@the-dreams.de \
    --to=wsa@the-dreams.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).