]> git.karo-electronics.de Git - karo-tx-linux.git/commit
hwmon: (ntc_thermistor) Fix OF device ID mapping
authorJean Delvare <jdelvare@suse.de>
Sun, 25 May 2014 23:40:21 +0000 (09:40 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Sun, 25 May 2014 23:40:21 +0000 (09:40 +1000)
commit5d0b6b3416871dc98761e2b553d4cac313eef73e
treef6d70183d14db9d93888ae30f52a87e531044e8a
parent6e3c8ce30fd250eaee82bd557699fc3fbf6c9879
hwmon: (ntc_thermistor) Fix OF device ID mapping

The mapping from OF device IDs to platform device IDs is wrong.
TYPE_NCPXXWB473 is 0, TYPE_NCPXXWL333 is 1, so
ntc_thermistor_id[TYPE_NCPXXWB473] is { "ncp15wb473", TYPE_NCPXXWB473 }
while
ntc_thermistor_id[TYPE_NCPXXWL333] is { "ncp18wb473", TYPE_NCPXXWB473 }.

So the name is wrong for all but the "ntc,ncp15wb473" entry, and the
type is wrong for the "ntc,ncp15wl333" entry.

So map the entries by index, it is neither elegant nor robust but at
least it is correct.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Fixes: 9e8269de hwmon: (ntc_thermistor) Add DT with IIO support to NTC thermistor driver
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Cc: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Cc: Doug Anderson <dianders@chromium.org>
drivers/hwmon/ntc_thermistor.c