]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (ntc_thermistor) Move and refactor DT parsing
authorLinus Walleij <linus.walleij@linaro.org>
Mon, 6 Dec 2021 02:04:21 +0000 (03:04 +0100)
committerGuenter Roeck <linux@roeck-us.net>
Sun, 26 Dec 2021 23:02:06 +0000 (15:02 -0800)
commitd2de64dd2b413e687e15a909e92c878f4e911fa0
tree866c527fe52f3ad6737ae2a476c76073cec5f155
parent27c569bc3e33c4252cb83ad7fc9e93dcb299b345
hwmon: (ntc_thermistor) Move and refactor DT parsing

Move the parsing of the DT config right above probe().

Allocate the state container for the driver in probe()
instead of inside the DT config parsing function: as a
result return an int instead of a pointer.

Drop the check for !np: we can only probe from DT right
now so no risk of ending up here.

Cc: Peter Rosin <peda@axentia.se>
Cc: Chris Lesiak <chris.lesiak@licor.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20211206020423.62402-1-linus.walleij@linaro.org
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/ntc_thermistor.c