]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
hwmon: (lm75) Create structure to save all the configuration parameters.
authorIker Perez del Palomar Sustatxa <iker.perez@codethink.co.uk>
Thu, 8 Aug 2019 08:02:43 +0000 (09:02 +0100)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 3 Sep 2019 19:47:17 +0000 (12:47 -0700)
commitdcb12653875e7cd969a6a18346bc1ed24ffb893b
treeac7971cf39f7116e691257542c712f9015d5aaa8
parent486842db3b79af126682d148477bf17ce025870a
hwmon: (lm75) Create structure to save all the configuration parameters.

* Add to lm75_data kind field to store the kind of device the driver is
  working with.
* Add an structure to store the configuration parameters of all the
  supported devices.
* Delete resolution_limits from lm75_data and include them in the structure
  described above.
* Add a pointer to the configuration parameters structure to be used as a
  reference to obtain the parameters.
* Delete switch-case approach to get the device configuration parameters.
* The structure is cleaner and easier to maintain.

Signed-off-by: Iker Perez del Palomar Sustatxa <iker.perez@codethink.co.uk>
Link: https://lore.kernel.org/r/20190808080246.8371-2-iker.perez@codethink.co.uk
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/lm75.c