Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 60931433 authored by Wolfram Sang's avatar Wolfram Sang Committed by Greg Kroah-Hartman
Browse files

macintosh: windfarm: fix MODINFO regression

commit bcf3588d8ed3517e6ffaf083f034812aee9dc8e2 upstream.

Commit af503716 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: af503716 ("i2c: core: report OF style module alias for devices registered via OF")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=199471


Reported-by: default avatarErhard Furtner <erhard_f@mailbox.org>
Tested-by: default avatarErhard Furtner <erhard_f@mailbox.org>
Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org # v4.17+
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2345c4d7
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -313,9 +313,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,
+7 −0
Original line number Diff line number Diff line
@@ -583,9 +583,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,
+15 −1
Original line number Diff line number Diff line
@@ -15,6 +15,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>
@@ -92,9 +93,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);

@@ -165,9 +171,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,
+7 −0
Original line number Diff line number Diff line
@@ -168,9 +168,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,
+7 −0
Original line number Diff line number Diff line
@@ -121,9 +121,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,
Loading