]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/i2c/chips/ds1682.c
i2c/eeprom: Hide Sony Vaio serial numbers
[linux-2.6-omap-h63xx.git] / drivers / i2c / chips / ds1682.c
index 25fd4676fb17a679cae1182a7c369e1de591e6b5..9e94542c18a2bc57abd22d05c17c0b04955fe7c3 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));
@@ -140,8 +141,8 @@ static const struct attribute_group ds1682_group = {
 /*
  * User data attribute
  */
-static ssize_t ds1682_eeprom_read(struct kobject *kobj, char *buf, loff_t off,
-                                 size_t count)
+static ssize_t ds1682_eeprom_read(struct kobject *kobj, struct bin_attribute *attr,
+                                 char *buf, loff_t off, size_t count)
 {
        struct i2c_client *client = kobj_to_i2c_client(kobj);
        int rc;
@@ -163,8 +164,8 @@ static ssize_t ds1682_eeprom_read(struct kobject *kobj, char *buf, loff_t off,
        return count;
 }
 
-static ssize_t ds1682_eeprom_write(struct kobject *kobj, char *buf, loff_t off,
-                                  size_t count)
+static ssize_t ds1682_eeprom_write(struct kobject *kobj, struct bin_attribute *attr,
+                                  char *buf, loff_t off, size_t count)
 {
        struct i2c_client *client = kobj_to_i2c_client(kobj);