]> 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)
commit32004258d27ebad3358f758cdabb910e00cdc2ef
tree179d23ab51a8008acc8d0f75a017383a5de5aa07
parentfa40389ce4487497c8964e80db6b36fd63c41d46
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