]> git.baikalelectronics.ru Git - kernel.git/commit
thermal: armada: Simplify the check of the validity bit
authorMiquel Raynal <miquel.raynal@free-electrons.com>
Fri, 22 Dec 2017 16:14:05 +0000 (17:14 +0100)
committerEduardo Valentin <edubezval@gmail.com>
Mon, 1 Jan 2018 21:15:41 +0000 (13:15 -0800)
commit27d92f27ae6c187978eb497fb5f366e7cb807d36
tree179d23ab51a8008acc8d0f75a017383a5de5aa07
parent7f3be017a88a7b351def8c3e7e4cb37dea2974b7
thermal: armada: Simplify the check of the validity bit

All Armada SoCs use one bit to declare if the sensor values are valid.
This bit moves across the versions of the IP.

The method until then was to do both a shift and compare with an useless
flag of "0x1". It is clearer and quicker to directly save the value that
must be ANDed instead of the bit position and do a single bitwise AND
operation.

Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
Reviewed-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/armada_thermal.c