hwmon: (ds1621) Avoid unneeded register access
authorJean Delvare <khali@linux-fr.org>
Mon, 30 Mar 2009 19:46:40 +0000 (21:46 +0200)
committerJean Delvare <khali@linux-fr.org>
Mon, 30 Mar 2009 19:46:40 +0000 (21:46 +0200)
commite4879e28abd67b894fb9d2db0afd08f1945670ba
treee6e9c1269c9ed949fb89bf7d31e116ace255d2ff
parent594592dc6f68356a3b7278eb4d260a50a66f0a06
hwmon: (ds1621) Avoid unneeded register access

Register access over SMBus isn't cheap, so avoid register access where
possible:
* Only write back the configuration register if it changed.
* Don't refresh the register cache when we don't have to.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Aurelien Jarno <aurelien@aurel32.net>
drivers/hwmon/ds1621.c