macintosh: windfarm: fix MODINFO regression
commitbcf3588d8e
upstream. Commitaf503716ac
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:af503716ac
("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+ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ea1299be02
commit
f19bbb24a1
|
@ -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,
|
||||
|
|
|
@ -582,9 +582,16 @@ static const struct i2c_device_id wf_fcu_id[] = {
|
|||
};
|
||||
MODULE_DEVICE_TABLE(i2c, wf_fcu_id);
|
||||
|
||||
static const struct of_device_id wf_fcu_of_id[] = {
|
||||
{ .compatible = "fcu", },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, wf_fcu_of_id);
|
||||
|
||||
static struct i2c_driver wf_fcu_driver = {
|
||||
.driver = {
|
||||
.name = "wf_fcu",
|
||||
.of_match_table = wf_fcu_of_id,
|
||||
},
|
||||
.probe = wf_fcu_probe,
|
||||
.remove = wf_fcu_remove,
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include <linux/init.h>
|
||||
#include <linux/wait.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <asm/prom.h>
|
||||
#include <asm/machdep.h>
|
||||
#include <asm/io.h>
|
||||
|
@ -91,9 +92,14 @@ static int wf_lm75_probe(struct i2c_client *client,
|
|||
const struct i2c_device_id *id)
|
||||
{
|
||||
struct wf_lm75_sensor *lm;
|
||||
int rc, ds1775 = id->driver_data;
|
||||
int rc, ds1775;
|
||||
const char *name, *loc;
|
||||
|
||||
if (id)
|
||||
ds1775 = id->driver_data;
|
||||
else
|
||||
ds1775 = !!of_device_get_match_data(&client->dev);
|
||||
|
||||
DBG("wf_lm75: creating %s device at address 0x%02x\n",
|
||||
ds1775 ? "ds1775" : "lm75", client->addr);
|
||||
|
||||
|
@ -164,9 +170,17 @@ static const struct i2c_device_id wf_lm75_id[] = {
|
|||
};
|
||||
MODULE_DEVICE_TABLE(i2c, wf_lm75_id);
|
||||
|
||||
static const struct of_device_id wf_lm75_of_id[] = {
|
||||
{ .compatible = "lm75", .data = (void *)0},
|
||||
{ .compatible = "ds1775", .data = (void *)1 },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, wf_lm75_of_id);
|
||||
|
||||
static struct i2c_driver wf_lm75_driver = {
|
||||
.driver = {
|
||||
.name = "wf_lm75",
|
||||
.of_match_table = wf_lm75_of_id,
|
||||
},
|
||||
.probe = wf_lm75_probe,
|
||||
.remove = wf_lm75_remove,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -120,9 +120,16 @@ static const struct i2c_device_id wf_max6690_id[] = {
|
|||
};
|
||||
MODULE_DEVICE_TABLE(i2c, wf_max6690_id);
|
||||
|
||||
static const struct of_device_id wf_max6690_of_id[] = {
|
||||
{ .compatible = "max6690", },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, wf_max6690_of_id);
|
||||
|
||||
static struct i2c_driver wf_max6690_driver = {
|
||||
.driver = {
|
||||
.name = "wf_max6690",
|
||||
.of_match_table = wf_max6690_of_id,
|
||||
},
|
||||
.probe = wf_max6690_probe,
|
||||
.remove = wf_max6690_remove,
|
||||
|
|
|
@ -341,9 +341,16 @@ static const struct i2c_device_id wf_sat_id[] = {
|
|||
};
|
||||
MODULE_DEVICE_TABLE(i2c, wf_sat_id);
|
||||
|
||||
static const struct of_device_id wf_sat_of_id[] = {
|
||||
{ .compatible = "smu-sat", },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, wf_sat_of_id);
|
||||
|
||||
static struct i2c_driver wf_sat_driver = {
|
||||
.driver = {
|
||||
.name = "wf_smu_sat",
|
||||
.of_match_table = wf_sat_of_id,
|
||||
},
|
||||
.probe = wf_sat_probe,
|
||||
.remove = wf_sat_remove,
|
||||
|
|
Loading…
Reference in New Issue