This patch removes an extra read of FIFO_STATUS register in the interrrupt
service routine. Which is read again before the actual use.
Signed-off-by: Naveen Krishna Chatradhi <[email protected]>
---
drivers/i2c/busses/i2c-exynos5.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c
index 63d2292..0d1a7bc 100644
--- a/drivers/i2c/busses/i2c-exynos5.c
+++ b/drivers/i2c/busses/i2c-exynos5.c
@@ -405,7 +405,6 @@ static irqreturn_t exynos5_i2c_irq(int irqno, void *dev_id)
int_status = readl(i2c->regs + HSI2C_INT_STATUS);
writel(int_status, i2c->regs + HSI2C_INT_STATUS);
- fifo_status = readl(i2c->regs + HSI2C_FIFO_STATUS);
/* handle interrupt related to the transfer status */
if (int_status & HSI2C_INT_I2C) {
--
1.7.9.5
This patch removes an extra line and fixes a styling nit
in exynos5_i2c_message_start()
Signed-off-by: Naveen Krishna Chatradhi <[email protected]>
---
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
Hi Naveen,
On Wed, Jun 25, 2014 at 4:08 PM, Naveen Krishna Chatradhi
<[email protected]> wrote:
> This patch removes an extra line and fixes a styling nit
> in exynos5_i2c_message_start()
>
> Signed-off-by: Naveen Krishna Chatradhi <[email protected]>
> ---
> 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;
This change looks more than just a styling nit. Please update the commit message
accordingly.
--
Regards,
Sachin.
Hello Sachin,
On 25 June 2014 16:19, Sachin Kamat <[email protected]> wrote:
> Hi Naveen,
>
> On Wed, Jun 25, 2014 at 4:08 PM, Naveen Krishna Chatradhi
> <[email protected]> wrote:
>> This patch removes an extra line and fixes a styling nit
>> in exynos5_i2c_message_start()
>>
>> Signed-off-by: Naveen Krishna Chatradhi <[email protected]>
>> ---
>> 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;
>
> This change looks more than just a styling nit. Please update the commit message
> accordingly.
Yea, change looks so.
But, This is not an going to change the way code works.
As, i2c_auto_conf is initialized to '0' at the beginning of the function
and HSI2C_READ_WRITE is defined as (1u << 16)
This being the 1st usage, I thought using "|=" is better way of assignment.
Will edit the commit message accordingly.
>
> --
> Regards,
> Sachin.
Thanks,
--
Shine bright,
(: Nav :)