aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/raid_class.h
diff options
context:
space:
mode:
authorTony Jones <tonyj@suse.de>2008-02-21 18:13:36 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-04-19 22:10:33 -0400
commitee959b00c335d7780136c5abda37809191fe52c3 (patch)
tree7775f3b274fd8caf5e7e5154fea89e96f2babd94 /include/linux/raid_class.h
parent56d110e852b0b1c85ad6c9bfe1cb4473ceb16402 (diff)
SCSI: convert struct class_device to struct device
It's big, but there doesn't seem to be a way to split it up smaller... Signed-off-by: Tony Jones <tonyj@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Cc: Roland Dreier <rolandd@cisco.com> Cc: Sean Hefty <sean.hefty@intel.com> Cc: Hal Rosenstock <hal.rosenstock@gmail.com> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/raid_class.h')
-rw-r--r--include/linux/raid_class.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/raid_class.h b/include/linux/raid_class.h
index d22ad392242a..6b537f1ac96c 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) \
54static inline void \ 54static inline void \
55raid_set_##attr(struct raid_template *r, struct device *dev, type value) { \ 55raid_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} \
63static inline type \ 63static inline type \
64raid_get_##attr(struct raid_template *r, struct device *dev) { \ 64raid_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