]> err.no Git - linux-2.6/blobdiff - drivers/i2c/busses/i2c-at91.c
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
[linux-2.6] / drivers / i2c / busses / i2c-at91.c
index 67f91bdda08909b32278b45ee6e0d1f4f6fee3d7..9c8b6d5eaec9ef301fe1491d6bf8ce714bfc3c8c 100644 (file)
@@ -16,8 +16,8 @@
 #include <linux/module.h>
 #include <linux/version.h>
 #include <linux/kernel.h>
+#include <linux/err.h>
 #include <linux/slab.h>
-#include <linux/pci.h>
 #include <linux/types.h>
 #include <linux/delay.h>
 #include <linux/i2c.h>
@@ -227,13 +227,14 @@ static int __devinit at91_i2c_probe(struct platform_device *pdev)
        adapter->algo = &at91_algorithm;
        adapter->class = I2C_CLASS_HWMON;
        adapter->dev.parent = &pdev->dev;
+       /* adapter->id == 0 ... only one TWI controller for now */
 
        platform_set_drvdata(pdev, adapter);
 
        clk_enable(twi_clk);            /* enable peripheral clock */
        at91_twi_hwinit();              /* initialize TWI controller */
 
-       rc = i2c_add_adapter(adapter);
+       rc = i2c_add_numbered_adapter(adapter);
        if (rc) {
                dev_err(&pdev->dev, "Adapter %s registration failed\n",
                                adapter->name);
@@ -296,6 +297,9 @@ static int at91_i2c_resume(struct platform_device *pdev)
 #define at91_i2c_resume                NULL
 #endif
 
+/* work with "modprobe at91_i2c" from hotplugging or coldplugging */
+MODULE_ALIAS("at91_i2c");
+
 static struct platform_driver at91_i2c_driver = {
        .probe          = at91_i2c_probe,
        .remove         = __devexit_p(at91_i2c_remove),