diff options
author | Wolfram Sang <wsa@the-dreams.de> | 2020-03-03 13:50:46 +0100 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2020-03-10 12:30:59 +0100 |
commit | bcf3588d8ed3517e6ffaf083f034812aee9dc8e2 (patch) | |
tree | 03c58ae5d94876872d89891017e0637bb4603c07 /drivers/macintosh/windfarm_ad7417_sensor.c | |
parent | 9be8bc4dd6177cf992b93b0bd014c4f611283896 (diff) | |
download | linux-bcf3588d8ed3517e6ffaf083f034812aee9dc8e2.tar.bz2 |
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_ad7417_sensor.c')
-rw-r--r-- | drivers/macintosh/windfarm_ad7417_sensor.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/macintosh/windfarm_ad7417_sensor.c b/drivers/macintosh/windfarm_ad7417_sensor.c index 125605987b44..e7dec328c7cf 100644 --- a/drivers/macintosh/windfarm_ad7417_sensor.c +++ b/drivers/macintosh/windfarm_ad7417_sensor.c @@ -312,9 +312,16 @@ static const struct i2c_device_id wf_ad7417_id[] = { }; MODULE_DEVICE_TABLE(i2c, wf_ad7417_id); +static const struct of_device_id wf_ad7417_of_id[] = { + { .compatible = "ad7417", }, + { } +}; +MODULE_DEVICE_TABLE(of, wf_ad7417_of_id); + static struct i2c_driver wf_ad7417_driver = { .driver = { .name = "wf_ad7417", + .of_match_table = wf_ad7417_of_id, }, .probe = wf_ad7417_probe, .remove = wf_ad7417_remove, |