From f01b8446e4652c02f8bfc4d8f540529a977e5750 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Thu, 17 Jan 2013 10:45:54 +0100 Subject: [PATCH] --- yaml --- r: 358793 b: refs/heads/master c: 05cf936846ca6aef1b34ba26054728fdbc154558 h: refs/heads/master i: 358791: e98b6ddc0ee28283fa9b3779d0c71420bcfcba4a v: v3 --- [refs] | 2 +- trunk/drivers/i2c/busses/i2c-sh_mobile.c | 14 ++++---------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/[refs] b/[refs] index 9edd0ed0df19..0cf343b1a286 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 626f0a2ff6bc9820b17c17958d5862262556892f +refs/heads/master: 05cf936846ca6aef1b34ba26054728fdbc154558 diff --git a/trunk/drivers/i2c/busses/i2c-sh_mobile.c b/trunk/drivers/i2c/busses/i2c-sh_mobile.c index b6e7a83a8296..34024f3a19f5 100644 --- a/trunk/drivers/i2c/busses/i2c-sh_mobile.c +++ b/trunk/drivers/i2c/busses/i2c-sh_mobile.c @@ -349,20 +349,14 @@ static unsigned char i2c_op(struct sh_mobile_i2c_data *pd, return ret; } -static int sh_mobile_i2c_is_first_byte(struct sh_mobile_i2c_data *pd) +static bool sh_mobile_i2c_is_first_byte(struct sh_mobile_i2c_data *pd) { - if (pd->pos == -1) - return 1; - - return 0; + return pd->pos == -1; } -static int sh_mobile_i2c_is_last_byte(struct sh_mobile_i2c_data *pd) +static bool sh_mobile_i2c_is_last_byte(struct sh_mobile_i2c_data *pd) { - if (pd->pos == (pd->msg->len - 1)) - return 1; - - return 0; + return pd->pos == pd->msg->len - 1; } static void sh_mobile_i2c_get_data(struct sh_mobile_i2c_data *pd,