hwmon: (lm90) Cache configuration register value
authorGuenter Roeck <linux@roeck-us.net>
Sun, 30 Jun 2019 22:14:19 +0000 (15:14 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 9 Jul 2019 01:11:30 +0000 (18:11 -0700)
commitb849e5d18c366eae8185837bd7c4adbd27213fe2
tree1406036f3979185c8e62a1f32147602e0f2864bc
parent62456189f3292c62f87aef363f204886dc1d4b48
hwmon: (lm90) Cache configuration register value

The configuration register does not change on its own. Yet, it is read
in various locations, modified, and written back. Simplify and optimize
the code by caching its value and by only writing it back when needed.

Cc: Boyang Yu <byu@arista.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/lm90.c