Merge branch 'linus' into x86/irq
[pandora-kernel.git] / drivers / i2c / chips / ds1682.c
index 5879f0f..23be4d4 100644 (file)
@@ -75,7 +75,8 @@ static ssize_t ds1682_show(struct device *dev, struct device_attribute *attr,
        /* Special case: the 32 bit regs are time values with 1/4s
         * resolution, scale them up to milliseconds */
        if (sattr->nr == 4)
-               return sprintf(buf, "%llu\n", ((u64) le32_to_cpu(val)) * 250);
+               return sprintf(buf, "%llu\n",
+                       ((unsigned long long)le32_to_cpu(val)) * 250);
 
        /* Format the output string and return # of bytes */
        return sprintf(buf, "%li\n", (long)le32_to_cpu(val));
@@ -199,7 +200,8 @@ static struct bin_attribute ds1682_eeprom_attr = {
 /*
  * Called when a ds1682 device is matched with this driver
  */
-static int ds1682_probe(struct i2c_client *client)
+static int ds1682_probe(struct i2c_client *client,
+                       const struct i2c_device_id *id)
 {
        int rc;
 
@@ -233,12 +235,19 @@ static int ds1682_remove(struct i2c_client *client)
        return 0;
 }
 
+static const struct i2c_device_id ds1682_id[] = {
+       { "ds1682", 0 },
+       { }
+};
+MODULE_DEVICE_TABLE(i2c, ds1682_id);
+
 static struct i2c_driver ds1682_driver = {
        .driver = {
                .name = "ds1682",
        },
        .probe = ds1682_probe,
        .remove = ds1682_remove,
+       .id_table = ds1682_id,
 };
 
 static int __init ds1682_init(void)