mlxsw: core_hwmon: Split temperature querying from show functions
authorAmit Cohen <amitc@mellanox.com>
Thu, 3 Sep 2020 13:41:44 +0000 (16:41 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Sep 2020 19:12:05 +0000 (12:12 -0700)
commitad38d47b2f9b7f8247ae1527a66a5924a585ab5a
tree388dfadf87f807b5ab9ea3119db07a5fc971b120
parent7544abd90e852d46eb65d23dfcfb41ed7b7e6008
mlxsw: core_hwmon: Split temperature querying from show functions

mlxsw_hwmon_module_temp_show(), mlxsw_hwmon_module_temp_critical_show()
and mlxsw_hwmon_module_temp_emergency_show() query the relevant
temperature from firmware and fill the value in provided buffers.

Split the temperature querying functionality to individual get()
functions and call them from the show() functions.

The get() functions will be used by subsequent patches in the set.

Signed-off-by: Amit Cohen <amitc@mellanox.com>
Reviewed-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c