@@ -2459,8 +2459,6 @@ static const struct sysfs_ops dev_sysfs_ops = {
.store = dev_attr_store,
};
-#define to_ext_attr(x) container_of(x, struct dev_ext_attribute, attr)
-
ssize_t device_store_ulong(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t size)
@@ -120,6 +120,12 @@ struct dev_ext_attribute {
void *var;
};
+static inline struct dev_ext_attribute *
+to_ext_attr(struct device_attribute *attr)
+{
+ return container_of(attr, struct dev_ext_attribute, attr);
+}
+
ssize_t device_show_ulong(struct device *dev, struct device_attribute *attr,
char *buf);
ssize_t device_store_ulong(struct device *dev, struct device_attribute *attr,