[lkml]   [2019]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 09/10] hwmon: (lm70) Avoid undefined reference to match table
We're going to remove of_match_ptr() from the definition of
of_match_device() when CONFIG_OF=n. This way we can always be certain
that of_match_device() acts the same when CONFIG_OF is set and when it
isn't. Add of_match_ptr() here so that this doesn't break when that
change is made to the of_match_device() API.

Cc: Arnd Bergmann <>
Cc: Geert Uytterhoeven <>
Cc: Jean Delvare <>
Cc: Guenter Roeck <>
Cc: Rob Herring <>
Cc: Frank Rowand <>
Cc: <>
Signed-off-by: Stephen Boyd <>

Please ack or pick for immediate merge so the last patch can be merged.

drivers/hwmon/lm70.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwmon/lm70.c b/drivers/hwmon/lm70.c
index 4122e59f0bb4..57480dada955 100644
--- a/drivers/hwmon/lm70.c
+++ b/drivers/hwmon/lm70.c
@@ -155,7 +155,7 @@ static int lm70_probe(struct spi_device *spi)
struct lm70 *p_lm70;
int chip;

- match = of_match_device(lm70_of_ids, &spi->dev);
+ match = of_match_device(of_match_ptr(lm70_of_ids), &spi->dev);
if (match)
chip = (int)(uintptr_t)match->data;
Sent by a computer through tubes
 \ /
  Last update: 2019-10-04 23:44    [W:0.339 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site