]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
hwmon: (lm90) Introduce function to update configuration register
authorGuenter Roeck <linux@roeck-us.net>
Sun, 30 Jun 2019 22:40:34 +0000 (15:40 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 9 Jul 2019 01:11:31 +0000 (18:11 -0700)
commit7a1d220ccb0cc2b808eb176fb05bf55a38179f3f
tree1df2965fb80aeed37e968cc6556b9474c639594f
parentb849e5d18c366eae8185837bd7c4adbd27213fe2
hwmon: (lm90) Introduce function to update configuration register

The code to update the configuration register is repeated several times.
Move it into a separate function. At the same time, un-inline
lm90_select_remote_channel() and leave it up to the compiler to decide
what to do with it. Also remove the 'client' argument from
lm90_select_remote_channel() and from lm90_write_convrate() and take
it from struct lm90_data instead where needed.

This patch reduces code size by more than 800 bytes on x86_64.

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