i2c-pnx: Map I2C adapter number to platform ID number
[safe/jmp/linux-2.6] / drivers / i2c / busses / i2c-simtec.c
index 10af8d3..6407f47 100644 (file)
@@ -92,7 +92,7 @@ static int simtec_i2c_probe(struct platform_device *dev)
                goto err;
        }
 
-       size = (res->end-res->start)+1;
+       size = resource_size(res);
 
        pd->ioarea = request_mem_region(res->start, size, dev->name);
        if (pd->ioarea == NULL) {
@@ -159,6 +159,9 @@ static int simtec_i2c_remove(struct platform_device *dev)
 
 /* device driver */
 
+/* work with hotplug and coldplug */
+MODULE_ALIAS("platform:simtec-i2c");
+
 static struct platform_driver simtec_i2c_driver = {
        .driver         = {
                .name           = "simtec-i2c",