Signed-off-by: Andi Shyti <a...@etezian.org>
---
 drivers/misc/bh1770glc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/bh1770glc.c b/drivers/misc/bh1770glc.c
index 031a9fa..bd90eaf 100644
--- a/drivers/misc/bh1770glc.c
+++ b/drivers/misc/bh1770glc.c
@@ -273,7 +273,7 @@ static inline u16 bh1770_lux_raw_to_adjusted(struct 
bh1770_chip *chip, u16 raw)
 {
        u32 lux;
        lux = ((u32)raw * chip->lux_corr) / BH1770_LUX_CORR_SCALE;
-       return min(lux, (u32)BH1770_LUX_RANGE);
+       return min_t(u32, lux, BH1770_LUX_RANGE);
 }
 
 static inline u16 bh1770_lux_adjusted_to_raw(struct bh1770_chip *chip,
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to