Thread (28 messages) 28 messages, 5 authors, 2013-09-27

Re: therm_pm72 units, interface

flat view

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2013-08-02 21:03:01
Subsystem: i2c subsystem, i2c subsystem host drivers, the rest · Maintainers: Andi Shyti, Linus Torvalds

On Fri, 2013-08-02 at 18:52 +0200, Michel Dänzer wrote:
Thanks for the suggestion. The same windfarm modules were loaded in both
cases, but i2c_powermac wasn't loaded with the newer kernels. Loading it
manually fixes the problem.

How is i2c_powermac supposed to get loaded with current kernels?
It's a platform driver, but it's missing a module device-table

Can you try this completely untested patch ?
diff --git a/drivers/i2c/busses/i2c-powermac.c b/drivers/i2c/busses/i2c-powermac.c
index 8dc90da..5af5153 100644
--- a/drivers/i2c/busses/i2c-powermac.c
+++ b/drivers/i2c/busses/i2c-powermac.c
@@ -458,9 +458,15 @@ static int i2c_powermac_probe(struct platform_device *dev)
 	return rc;
 }
 
+static const struct platform_device_id i2c_powermac_id = {
+	.name = "i2c-powermac"
+};
+MODULE_DEVICE_TABLE(platform, i2c_powermac_id);
+
 static struct platform_driver i2c_powermac_driver = {
 	.probe = i2c_powermac_probe,
 	.remove = i2c_powermac_remove,
+	.id_table = *i2c_powermac_id,
 	.driver = {
 		.name = "i2c-powermac",
 		.bus = &platform_bus_type,
@@ -468,5 +474,3 @@ static struct platform_driver i2c_powermac_driver = {
 };
 
 module_platform_driver(i2c_powermac_driver);
-
-MODULE_ALIAS("platform:i2c-powermac");
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help