i2c-nforce2-s4985: Load automatically as needed
PATCH 1/1 i2c-nforce2-s4985: Load automatically as needed
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(+)
drivers/i2c/busses/i2c-nforce2-s4985.c +14 -0
@@ -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;
Signature · 6 lines
Jean Delvare _______________________________________________ i2c mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/i2c