hwmon: (ina238) Drop pointless power attribute check on attribute writes
authorGuenter Roeck <linux@roeck-us.net>
Mon, 1 Sep 2025 18:01:53 +0000 (11:01 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Sun, 7 Sep 2025 23:34:07 +0000 (16:34 -0700)
commit8640f9ab1015741e22dff2dd1d6665ad024d5534
treee696216f9ad474aa9c284e16e1dca0d990fb7adb
parentf2711a19651f28b426cf78792822a37f7641f43c
hwmon: (ina238) Drop pointless power attribute check on attribute writes

There is only a single writeable power attribute, and it is very unlikely
that the chips supported by this driver will ever require another one.
That means checking for that attribute during runtime is unnecessary.
Drop the check. Rename the write function from ina238_write_power() to
ina238_write_power_max() to reflect that a single attribute is written.

No functional change intended.

Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz> # INA780
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/ina238.c