aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ti/wlcore/spi.c
diff options
context:
space:
mode:
authorSilvan Jegen <s.jegen@gmail.com>2014-02-25 18:12:52 +0100
committerJohn W. Linville <linville@tuxdriver.com>2014-03-03 15:35:54 -0500
commitc8e4955653a470ece7bf580c84fc88eb58cc9850 (patch)
tree0517b79659c4b4b0d83528dfc973d99c4de19770 /drivers/net/wireless/ti/wlcore/spi.c
parent9ffd2e9a174769913dcce0fbc9223b58d2eb5526 (diff)
net: Replace min macro with min_t
Instead of an explicit cast, use the min_t macro. Signed-off-by: Silvan Jegen <s.jegen@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ti/wlcore/spi.c')
-rw-r--r--drivers/net/wireless/ti/wlcore/spi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/ti/wlcore/spi.c b/drivers/net/wireless/ti/wlcore/spi.c
index b2c018dccf18..dbe826dd7c23 100644
--- a/drivers/net/wireless/ti/wlcore/spi.c
+++ b/drivers/net/wireless/ti/wlcore/spi.c
@@ -211,7 +211,7 @@ static int __must_check wl12xx_spi_raw_read(struct device *child, int addr,
u32 chunk_len;
while (len > 0) {
- chunk_len = min((size_t)WSPI_MAX_CHUNK_SIZE, len);
+ chunk_len = min_t(size_t, WSPI_MAX_CHUNK_SIZE, len);
cmd = &wl->buffer_cmd;
busy_buf = wl->buffer_busyword;
@@ -285,7 +285,7 @@ static int __must_check wl12xx_spi_raw_write(struct device *child, int addr,
cmd = &commands[0];
i = 0;
while (len > 0) {
- chunk_len = min((size_t)WSPI_MAX_CHUNK_SIZE, len);
+ chunk_len = min_t(size_t, WSPI_MAX_CHUNK_SIZE, len);
*cmd = 0;
*cmd |= WSPI_CMD_WRITE;