* User data attribute
  */
 static ssize_t ds1682_eeprom_read(struct file *filp, struct kobject *kobj,
-                                 struct bin_attribute *attr,
+                                 const struct bin_attribute *attr,
                                  char *buf, loff_t off, size_t count)
 {
        struct i2c_client *client = kobj_to_i2c_client(kobj);
 }
 
 static ssize_t ds1682_eeprom_write(struct file *filp, struct kobject *kobj,
-                                  struct bin_attribute *attr,
+                                  const struct bin_attribute *attr,
                                   char *buf, loff_t off, size_t count)
 {
        struct i2c_client *client = kobj_to_i2c_client(kobj);
                .mode = S_IRUGO | S_IWUSR,
        },
        .size = DS1682_EEPROM_SIZE,
-       .read = ds1682_eeprom_read,
-       .write = ds1682_eeprom_write,
+       .read_new = ds1682_eeprom_read,
+       .write_new = ds1682_eeprom_write,
 };
 
 static int ds1682_nvmem_read(void *priv, unsigned int offset, void *val,