summaryrefslogtreecommitdiff
path: root/drivers/macintosh/windfarm_lm87_sensor.c
diff options
context:
space:
mode:
authorWolfram Sang <wsa@the-dreams.de>2020-03-03 13:50:46 +0100
committerWolfram Sang <wsa@the-dreams.de>2020-03-10 12:30:59 +0100
commitbcf3588d8ed3517e6ffaf083f034812aee9dc8e2 (patch)
tree03c58ae5d94876872d89891017e0637bb4603c07 /drivers/macintosh/windfarm_lm87_sensor.c
parent9be8bc4dd6177cf992b93b0bd014c4f611283896 (diff)
macintosh: windfarm: fix MODINFO regression
Commit af503716ac14 made sure OF devices get an OF style modalias with I2C events. It assumed all in-tree users were converted, yet it missed some Macintosh drivers. Add an OF module device table for all windfarm drivers to make them automatically load again. Fixes: af503716ac14 ("i2c: core: report OF style module alias for devices registered via OF") Link: https://bugzilla.kernel.org/show_bug.cgi?id=199471 Reported-by: Erhard Furtner <erhard_f@mailbox.org> Tested-by: Erhard Furtner <erhard_f@mailbox.org> Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc) Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org # v4.17+
Diffstat (limited to 'drivers/macintosh/windfarm_lm87_sensor.c')
-rw-r--r--drivers/macintosh/windfarm_lm87_sensor.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/macintosh/windfarm_lm87_sensor.c b/drivers/macintosh/windfarm_lm87_sensor.c
index b03a33b803b7..d011899c0a8a 100644
--- a/drivers/macintosh/windfarm_lm87_sensor.c
+++ b/drivers/macintosh/windfarm_lm87_sensor.c
@@ -166,9 +166,16 @@ static const struct i2c_device_id wf_lm87_id[] = {
};
MODULE_DEVICE_TABLE(i2c, wf_lm87_id);
+static const struct of_device_id wf_lm87_of_id[] = {
+ { .compatible = "lm87cimt", },
+ { }
+};
+MODULE_DEVICE_TABLE(of, wf_lm87_of_id);
+
static struct i2c_driver wf_lm87_driver = {
.driver = {
.name = "wf_lm87",
+ .of_match_table = wf_lm87_of_id,
},
.probe = wf_lm87_probe,
.remove = wf_lm87_remove,