hwmon: (lm70) Use device_get_match_data()
authorStephen Boyd <swboyd@chromium.org>
Sat, 23 Jan 2021 03:44:27 +0000 (19:44 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 14:56:07 +0000 (16:56 +0200)
commit5cfc66b4545066b42407fa2501a9017519151df1
treee3c27a0d5a6881efd1d85c7f8e0511595f196574
parentc9f8416e43f834c5273e99d7a29ddb653458716c
hwmon: (lm70) Use device_get_match_data()

[ Upstream commit 6e09d75513d2670b7ab91ab3584fc5bcf2675a75 ]

Use the more modern API to get the match data out of the of match table.
This saves some code, lines, and nicely avoids referencing the match
table when it is undefined with configurations where CONFIG_OF=n.

Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Jean Delvare <jdelvare@suse.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: <linux-hwmon@vger.kernel.org>
[robh: rework to use device_get_match_data()]
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hwmon/lm70.c