diff options
Diffstat (limited to 'include/linux/raid_class.h')
-rw-r--r-- | include/linux/raid_class.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/raid_class.h b/include/linux/raid_class.h index d22ad392242..6b537f1ac96 100644 --- a/include/linux/raid_class.h +++ b/include/linux/raid_class.h | |||
@@ -53,20 +53,20 @@ struct raid_data { | |||
53 | #define DEFINE_RAID_ATTRIBUTE(type, attr) \ | 53 | #define DEFINE_RAID_ATTRIBUTE(type, attr) \ |
54 | static inline void \ | 54 | static inline void \ |
55 | raid_set_##attr(struct raid_template *r, struct device *dev, type value) { \ | 55 | raid_set_##attr(struct raid_template *r, struct device *dev, type value) { \ |
56 | struct class_device *cdev = \ | 56 | struct device *device = \ |
57 | attribute_container_find_class_device(&r->raid_attrs.ac, dev);\ | 57 | attribute_container_find_class_device(&r->raid_attrs.ac, dev);\ |
58 | struct raid_data *rd; \ | 58 | struct raid_data *rd; \ |
59 | BUG_ON(!cdev); \ | 59 | BUG_ON(!device); \ |
60 | rd = class_get_devdata(cdev); \ | 60 | rd = dev_get_drvdata(device); \ |
61 | rd->attr = value; \ | 61 | rd->attr = value; \ |
62 | } \ | 62 | } \ |
63 | static inline type \ | 63 | static inline type \ |
64 | raid_get_##attr(struct raid_template *r, struct device *dev) { \ | 64 | raid_get_##attr(struct raid_template *r, struct device *dev) { \ |
65 | struct class_device *cdev = \ | 65 | struct device *device = \ |
66 | attribute_container_find_class_device(&r->raid_attrs.ac, dev);\ | 66 | attribute_container_find_class_device(&r->raid_attrs.ac, dev);\ |
67 | struct raid_data *rd; \ | 67 | struct raid_data *rd; \ |
68 | BUG_ON(!cdev); \ | 68 | BUG_ON(!device); \ |
69 | rd = class_get_devdata(cdev); \ | 69 | rd = dev_get_drvdata(device); \ |
70 | return rd->attr; \ | 70 | return rd->attr; \ |
71 | } | 71 | } |
72 | 72 | ||