-static struct device_attribute powercap_def_attrs[] = {
- __ATTR(enabled, S_IWUSR | S_IRUGO, enabled_show,
- enabled_store),
- __ATTR_NULL
+static DEVICE_ATTR_RW(enabled);
+
+static struct attribute *powercap_attrs[] = {
+ &dev_attr_enabled.attr,
+ NULL,