linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
To: linux-samsung-soc@vger.kernel.org, linux-i2c@vger.kernel.org
Cc: naveenkrishna.ch@gmail.com, linux-arm-kernel@lists.infradead.org,
	sjg@chromium.org, linux-kernel@vger.kernel.org,
	wsa@the-dreams.de, cpgs@samsung.com, broonie@kernel.org
Subject: [PATCH 2/2 v2] i2c: exynos5: remove extra line and fix an assignment
Date: Thu, 26 Jun 2014 10:44:58 +0530	[thread overview]
Message-ID: <1403759698-15624-2-git-send-email-ch.naveen@samsung.com> (raw)
In-Reply-To: <1403759698-15624-1-git-send-email-ch.naveen@samsung.com>

This patch does the following in exynos5_i2c_message_start() function
1. Fixes an assignment
   As, "i2c_auto_conf" is initialized to '0' at the beginning of the
   function and HSI2C_READ_WRITE is defined as (1u << 16)

   Using "|=" for the first assignment is more readable.

2. Removes an extra line 

Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
---
Changes since v1:
Edited commit message for clarity

 drivers/i2c/busses/i2c-exynos5.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c
index 0d1a7bc..4c2e6f3 100644
--- a/drivers/i2c/busses/i2c-exynos5.c
+++ b/drivers/i2c/busses/i2c-exynos5.c
@@ -525,7 +525,7 @@ static void exynos5_i2c_message_start(struct exynos5_i2c *i2c, int stop)
 	if (i2c->msg->flags & I2C_M_RD) {
 		i2c_ctl |= HSI2C_RXCHON;
 
-		i2c_auto_conf = HSI2C_READ_WRITE;
+		i2c_auto_conf |= HSI2C_READ_WRITE;
 
 		trig_lvl = (i2c->msg->len > i2c->variant->fifo_depth) ?
 			(i2c->variant->fifo_depth * 3 / 4) : i2c->msg->len;
@@ -548,7 +548,6 @@ static void exynos5_i2c_message_start(struct exynos5_i2c *i2c, int stop)
 	writel(fifo_ctl, i2c->regs + HSI2C_FIFO_CTL);
 	writel(i2c_ctl, i2c->regs + HSI2C_CTL);
 
-
 	/*
 	 * Enable interrupts before starting the transfer so that we don't
 	 * miss any INT_I2C interrupts.
-- 
1.7.9.5

  reply	other threads:[~2014-06-26  5:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-26  5:14 [PATCH 1/2 v2] i2c: exynos5: remove an unnecessary read of FIFO_STATUS register Naveen Krishna Chatradhi
2014-06-26  5:14 ` Naveen Krishna Chatradhi [this message]
2014-07-17 10:02   ` [PATCH 2/2 v2] i2c: exynos5: remove extra line and fix an assignment Wolfram Sang
2014-07-17 10:02 ` [PATCH 1/2 v2] i2c: exynos5: remove an unnecessary read of FIFO_STATUS register Wolfram Sang

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=1403759698-15624-2-git-send-email-ch.naveen@samsung.com \
    --to=ch.naveen@samsung.com \
    --cc=broonie@kernel.org \
    --cc=cpgs@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=naveenkrishna.ch@gmail.com \
    --cc=sjg@chromium.org \
    --cc=wsa@the-dreams.de \
    /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).