auxdisplay: ks0108: use min_t
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Mon, 20 Jul 2015 11:57:23 +0000 (17:27 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Aug 2015 20:36:49 +0000 (13:36 -0700)
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>
drivers/auxdisplay/ks0108.c

index 30d6d0e4d7667c47ad02f8e17de33be96a1aedc4..ce00e95040bf3bb7f0d3b1d56a673634c615492d 100644 (file)
@@ -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);