summaryrefslogtreecommitdiff
path: root/drivers/auxdisplay
diff options
context:
space:
mode:
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>2015-07-20 17:27:23 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-08-05 13:36:49 -0700
commitc9efdbe63410984668a4983cc46e31a7b3f0c74e (patch)
tree272e74a020e49ff1d45331e22b2aeb1830f99640 /drivers/auxdisplay
parent7faad1dfbbe008fe564d94c1b154695fcc13d748 (diff)
downloadlwn-c9efdbe63410984668a4983cc46e31a7b3f0c74e.tar.gz
lwn-c9efdbe63410984668a4983cc46e31a7b3f0c74e.zip
auxdisplay: ks0108: use min_t
Using min_t() is preffered than using min(). Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/auxdisplay')
-rw-r--r--drivers/auxdisplay/ks0108.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/auxdisplay/ks0108.c b/drivers/auxdisplay/ks0108.c
index 30d6d0e4d766..ce00e95040bf 100644
--- a/drivers/auxdisplay/ks0108.c
+++ b/drivers/auxdisplay/ks0108.c
@@ -92,17 +92,19 @@ void ks0108_displaystate(unsigned char state)
void ks0108_startline(unsigned char startline)
{
- ks0108_writedata(min(startline,(unsigned char)63) | bit(6) | bit(7));
+ ks0108_writedata(min_t(unsigned char, startline, 63) | bit(6) |
+ bit(7));
}
void ks0108_address(unsigned char address)
{
- ks0108_writedata(min(address,(unsigned char)63) | bit(6));
+ ks0108_writedata(min_t(unsigned char, address, 63) | bit(6));
}
void ks0108_page(unsigned char page)
{
- ks0108_writedata(min(page,(unsigned char)7) | bit(3) | bit(4) | bit(5) | bit(7));
+ ks0108_writedata(min_t(unsigned char, page, 7) | bit(3) | bit(4) |
+ bit(5) | bit(7));
}
EXPORT_SYMBOL_GPL(ks0108_writedata);