From: peda@axentia.se (Peter Rosin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 07/21] i2c: efm32: make use of i2c_8bit_addr_from_msg
Date: Mon, 14 May 2018 16:53:16 +0200 [thread overview]
Message-ID: <20180514145330.4857-8-peda@axentia.se> (raw)
In-Reply-To: <20180514145330.4857-1-peda@axentia.se>
Because it looks neater.
Signed-off-by: Peter Rosin <peda@axentia.se>
---
drivers/i2c/busses/i2c-efm32.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-efm32.c b/drivers/i2c/busses/i2c-efm32.c
index aa336ba89aa3..5f2bab878b2c 100644
--- a/drivers/i2c/busses/i2c-efm32.c
+++ b/drivers/i2c/busses/i2c-efm32.c
@@ -144,8 +144,7 @@ static void efm32_i2c_send_next_msg(struct efm32_i2c_ddata *ddata)
struct i2c_msg *cur_msg = &ddata->msgs[ddata->current_msg];
efm32_i2c_write32(ddata, REG_CMD, REG_CMD_START);
- efm32_i2c_write32(ddata, REG_TXDATA, cur_msg->addr << 1 |
- (cur_msg->flags & I2C_M_RD ? 1 : 0));
+ efm32_i2c_write32(ddata, REG_TXDATA, i2c_8bit_addr_from_msg(cur_msg));
}
static void efm32_i2c_send_next_byte(struct efm32_i2c_ddata *ddata)
--
2.11.0
next prev parent reply other threads:[~2018-05-14 14:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-14 14:53 [PATCH 00/21] i2c: make use of i2c_8bit_addr_from_msg Peter Rosin
2018-05-14 14:53 ` [PATCH 04/21] i2c: aspeed: " Peter Rosin
2018-05-14 14:53 ` Peter Rosin [this message]
2018-05-14 18:27 ` [PATCH 07/21] i2c: efm32: " Uwe Kleine-König
2018-05-14 14:53 ` [PATCH 20/21] i2c: stu300: " Peter Rosin
2018-05-14 19:54 ` Linus Walleij
2018-05-14 16:11 ` [PATCH 00/21] i2c: " Joe Perches
2018-05-14 17:01 ` Peter Rosin
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=20180514145330.4857-8-peda@axentia.se \
--to=peda@axentia.se \
--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