.attrs = lm90_attributes,
};
+static struct attribute *lm90_temp2_offset_attributes[] = {
+ &sensor_dev_attr_temp2_offset.dev_attr.attr,
+ NULL
+};
+
+static const struct attribute_group lm90_temp2_offset_group = {
+ .attrs = lm90_temp2_offset_attributes,
+};
+
/*
* Additional attributes for devices with emergency sensors
*/
if (data->flags & LM90_HAVE_EMERGENCY)
sysfs_remove_group(&dev->kobj, &lm90_emergency_group);
if (data->flags & LM90_HAVE_OFFSET)
- device_remove_file(dev, &sensor_dev_attr_temp2_offset.dev_attr);
+ sysfs_remove_group(&dev->kobj, &lm90_temp2_offset_group);
device_remove_file(dev, &dev_attr_pec);
sysfs_remove_group(&dev->kobj, &lm90_group);
}
goto exit_remove_files;
}
if (data->flags & LM90_HAVE_OFFSET) {
- err = device_create_file(dev,
- &sensor_dev_attr_temp2_offset.dev_attr);
+ err = sysfs_create_group(&dev->kobj, &lm90_temp2_offset_group);
if (err)
goto exit_remove_files;
}