Let the i2c-nforce2-s4985 module load automatically on the Tyan S4985.
We use the PCI sub-IDs for this.
Signed-off-by: Jean Delvare <[EMAIL PROTECTED]>
---
Ulrich, can you please test this patch again, on top of Linus' latest
kernel tree? There have been a number of fixes done to the
i2c-nforce-s4985 driver meanwhile, so maybe this patch will work fine
now.
drivers/i2c/busses/i2c-nforce2-s4985.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
--- linux-2.6.26-rc1.orig/drivers/i2c/busses/i2c-nforce2-s4985.c
2008-05-07 14:39:05.000000000 +0200
+++ linux-2.6.26-rc1/drivers/i2c/busses/i2c-nforce2-s4985.c 2008-05-07
21:00:10.000000000 +0200
@@ -37,6 +37,20 @@
#include <linux/init.h>
#include <linux/i2c.h>
#include <linux/mutex.h>
+#include <linux/pci_ids.h>
+#include <linux/mod_devicetable.h>
+
+/* Let the driver autoload */
+static struct pci_device_id s4985_ids[] = {
+ {
+ .vendor = PCI_VENDOR_ID_NVIDIA,
+ .device = PCI_DEVICE_ID_NVIDIA_NFORCE4_SMBUS,
+ .subvendor = 0x10f1, /* Tyan Computer */
+ .subdevice = 0x4985, /* S4985 */
+ },
+ { }
+};
+MODULE_DEVICE_TABLE(pci, s4985_ids);
extern struct i2c_adapter *nforce2_smbus;
--
Jean Delvare
_______________________________________________
i2c mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c