From 8edf52a1e92d24fa42425b100d8621874cf172e1 Mon Sep 17 00:00:00 2001 From: Heiner Kallweit Date: Sat, 25 Mar 2017 13:58:30 +0100 Subject: i2c: meson: use min instead of min_t where min_t isn't needed Use min instead of min_t where min_t isn't needed. Signed-off-by: Heiner Kallweit Signed-off-by: Wolfram Sang --- drivers/i2c/busses/i2c-meson.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/i2c') diff --git a/drivers/i2c/busses/i2c-meson.c b/drivers/i2c/busses/i2c-meson.c index 73b97c71a484..40e5da9a0af0 100644 --- a/drivers/i2c/busses/i2c-meson.c +++ b/drivers/i2c/busses/i2c-meson.c @@ -156,10 +156,10 @@ static void meson_i2c_get_data(struct meson_i2c *i2c, char *buf, int len) dev_dbg(i2c->dev, "%s: data %08x %08x len %d\n", __func__, rdata0, rdata1, len); - for (i = 0; i < min_t(int, 4, len); i++) + for (i = 0; i < min(4, len); i++) *buf++ = (rdata0 >> i * 8) & 0xff; - for (i = 4; i < min_t(int, 8, len); i++) + for (i = 4; i < min(8, len); i++) *buf++ = (rdata1 >> (i - 4) * 8) & 0xff; } @@ -168,10 +168,10 @@ static void meson_i2c_put_data(struct meson_i2c *i2c, char *buf, int len) u32 wdata0 = 0, wdata1 = 0; int i; - for (i = 0; i < min_t(int, 4, len); i++) + for (i = 0; i < min(4, len); i++) wdata0 |= *buf++ << (i * 8); - for (i = 4; i < min_t(int, 8, len); i++) + for (i = 4; i < min(8, len); i++) wdata1 |= *buf++ << ((i - 4) * 8); writel(wdata0, i2c->regs + REG_TOK_WDATA0); @@ -186,7 +186,7 @@ static void meson_i2c_prepare_xfer(struct meson_i2c *i2c) bool write = !(i2c->msg->flags & I2C_M_RD); int i; - i2c->count = min_t(int, i2c->msg->len - i2c->pos, 8); + i2c->count = min(i2c->msg->len - i2c->pos, 8); for (i = 0; i < i2c->count - 1; i++) meson_i2c_add_token(i2c, TOKEN_DATA); -- cgit v1.2.3