]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (ina3221) Do not read-back to cache reg_config
authorNicolin Chen <nicoleotsuka@gmail.com>
Wed, 17 Apr 2019 23:12:09 +0000 (16:12 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Thu, 18 Apr 2019 13:37:25 +0000 (06:37 -0700)
commitab3ef3823029aad218958f75d59d01d2685b414a
tree5531a43aec4f8fe58c96764af8761bcdd84096ec
parentab5f6fd61358a9c85abc08372d6629590362f718
hwmon: (ina3221) Do not read-back to cache reg_config

Reading back the CONFIG register increases an extra I2C
transaction. This's not necessary and could be replaced
with a local variable caching the register settings.

So this patch replaces two readback regmap_read() calls
with a tmp variable.

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/ina3221.c