diff options
author | Tony Jones <tonyj@suse.de> | 2008-02-21 18:13:36 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-04-19 22:10:33 -0400 |
commit | ee959b00c335d7780136c5abda37809191fe52c3 (patch) | |
tree | 7775f3b274fd8caf5e7e5154fea89e96f2babd94 /include | |
parent | 56d110e852b0b1c85ad6c9bfe1cb4473ceb16402 (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')
-rw-r--r-- | include/linux/attribute_container.h | 28 | ||||
-rw-r--r-- | include/linux/bsg.h | 2 | ||||
-rw-r--r-- | include/linux/enclosure.h | 11 | ||||
-rw-r--r-- | include/linux/libata.h | 2 | ||||
-rw-r--r-- | include/linux/raid_class.h | 12 | ||||
-rw-r--r-- | include/linux/transport_class.h | 6 | ||||
-rw-r--r-- | include/scsi/scsi_device.h | 10 | ||||
-rw-r--r-- | include/scsi/scsi_host.h | 7 | ||||
-rw-r--r-- | include/scsi/scsi_transport.h | 2 | ||||
-rw-r--r-- | include/scsi/scsi_transport_fc.h | 14 | ||||
-rw-r--r-- | include/scsi/scsi_transport_sas.h | 12 | ||||
-rw-r--r-- | include/scsi/sd.h | 4 |
12 files changed, 55 insertions, 55 deletions
diff --git a/include/linux/attribute_container.h b/include/linux/attribute_container.h index 574b201b99d8..794ad74b1d61 100644 --- a/include/linux/attribute_container.h +++ b/include/linux/attribute_container.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * class_container.h - a generic container for all classes | 2 | * attribute_container.h - a generic container for all classes |
3 | * | 3 | * |
4 | * Copyright (c) 2005 - James Bottomley <James.Bottomley@steeleye.com> | 4 | * Copyright (c) 2005 - James Bottomley <James.Bottomley@steeleye.com> |
5 | * | 5 | * |
@@ -18,7 +18,7 @@ struct attribute_container { | |||
18 | struct klist containers; | 18 | struct klist containers; |
19 | struct class *class; | 19 | struct class *class; |
20 | struct attribute_group *grp; | 20 | struct attribute_group *grp; |
21 | struct class_device_attribute **attrs; | 21 | struct device_attribute **attrs; |
22 | int (*match)(struct attribute_container *, struct device *); | 22 | int (*match)(struct attribute_container *, struct device *); |
23 | #define ATTRIBUTE_CONTAINER_NO_CLASSDEVS 0x01 | 23 | #define ATTRIBUTE_CONTAINER_NO_CLASSDEVS 0x01 |
24 | unsigned long flags; | 24 | unsigned long flags; |
@@ -41,31 +41,31 @@ int __must_check attribute_container_unregister(struct attribute_container *cont | |||
41 | void attribute_container_create_device(struct device *dev, | 41 | void attribute_container_create_device(struct device *dev, |
42 | int (*fn)(struct attribute_container *, | 42 | int (*fn)(struct attribute_container *, |
43 | struct device *, | 43 | struct device *, |
44 | struct class_device *)); | 44 | struct device *)); |
45 | void attribute_container_add_device(struct device *dev, | 45 | void attribute_container_add_device(struct device *dev, |
46 | int (*fn)(struct attribute_container *, | 46 | int (*fn)(struct attribute_container *, |
47 | struct device *, | 47 | struct device *, |
48 | struct class_device *)); | 48 | struct device *)); |
49 | void attribute_container_remove_device(struct device *dev, | 49 | void attribute_container_remove_device(struct device *dev, |
50 | void (*fn)(struct attribute_container *, | 50 | void (*fn)(struct attribute_container *, |
51 | struct device *, | 51 | struct device *, |
52 | struct class_device *)); | 52 | struct device *)); |
53 | void attribute_container_device_trigger(struct device *dev, | 53 | void attribute_container_device_trigger(struct device *dev, |
54 | int (*fn)(struct attribute_container *, | 54 | int (*fn)(struct attribute_container *, |
55 | struct device *, | 55 | struct device *, |
56 | struct class_device *)); | 56 | struct device *)); |
57 | void attribute_container_trigger(struct device *dev, | 57 | void attribute_container_trigger(struct device *dev, |
58 | int (*fn)(struct attribute_container *, | 58 | int (*fn)(struct attribute_container *, |
59 | struct device *)); | 59 | struct device *)); |
60 | int attribute_container_add_attrs(struct class_device *classdev); | 60 | int attribute_container_add_attrs(struct device *classdev); |
61 | int attribute_container_add_class_device(struct class_device *classdev); | 61 | int attribute_container_add_class_device(struct device *classdev); |
62 | int attribute_container_add_class_device_adapter(struct attribute_container *cont, | 62 | int attribute_container_add_class_device_adapter(struct attribute_container *cont, |
63 | struct device *dev, | 63 | struct device *dev, |
64 | struct class_device *classdev); | 64 | struct device *classdev); |
65 | void attribute_container_remove_attrs(struct class_device *classdev); | 65 | void attribute_container_remove_attrs(struct device *classdev); |
66 | void attribute_container_class_device_del(struct class_device *classdev); | 66 | void attribute_container_class_device_del(struct device *classdev); |
67 | struct attribute_container *attribute_container_classdev_to_container(struct class_device *); | 67 | struct attribute_container *attribute_container_classdev_to_container(struct device *); |
68 | struct class_device *attribute_container_find_class_device(struct attribute_container *, struct device *); | 68 | struct device *attribute_container_find_class_device(struct attribute_container *, struct device *); |
69 | struct class_device_attribute **attribute_container_classdev_to_attrs(const struct class_device *classdev); | 69 | struct device_attribute **attribute_container_classdev_to_attrs(const struct device *classdev); |
70 | 70 | ||
71 | #endif | 71 | #endif |
diff --git a/include/linux/bsg.h b/include/linux/bsg.h index 60e377b520f8..e8406c55c6d3 100644 --- a/include/linux/bsg.h +++ b/include/linux/bsg.h | |||
@@ -55,7 +55,7 @@ struct sg_io_v4 { | |||
55 | 55 | ||
56 | #if defined(CONFIG_BLK_DEV_BSG) | 56 | #if defined(CONFIG_BLK_DEV_BSG) |
57 | struct bsg_class_device { | 57 | struct bsg_class_device { |
58 | struct class_device *class_dev; | 58 | struct device *class_dev; |
59 | struct device *dev; | 59 | struct device *dev; |
60 | int minor; | 60 | int minor; |
61 | struct request_queue *queue; | 61 | struct request_queue *queue; |
diff --git a/include/linux/enclosure.h b/include/linux/enclosure.h index a5978f18ca40..4332442b1b57 100644 --- a/include/linux/enclosure.h +++ b/include/linux/enclosure.h | |||
@@ -82,7 +82,8 @@ struct enclosure_component_callbacks { | |||
82 | 82 | ||
83 | struct enclosure_component { | 83 | struct enclosure_component { |
84 | void *scratch; | 84 | void *scratch; |
85 | struct class_device cdev; | 85 | struct device cdev; |
86 | struct device *dev; | ||
86 | enum enclosure_component_type type; | 87 | enum enclosure_component_type type; |
87 | int number; | 88 | int number; |
88 | int fault; | 89 | int fault; |
@@ -94,20 +95,20 @@ struct enclosure_component { | |||
94 | struct enclosure_device { | 95 | struct enclosure_device { |
95 | void *scratch; | 96 | void *scratch; |
96 | struct list_head node; | 97 | struct list_head node; |
97 | struct class_device cdev; | 98 | struct device edev; |
98 | struct enclosure_component_callbacks *cb; | 99 | struct enclosure_component_callbacks *cb; |
99 | int components; | 100 | int components; |
100 | struct enclosure_component component[0]; | 101 | struct enclosure_component component[0]; |
101 | }; | 102 | }; |
102 | 103 | ||
103 | static inline struct enclosure_device * | 104 | static inline struct enclosure_device * |
104 | to_enclosure_device(struct class_device *dev) | 105 | to_enclosure_device(struct device *dev) |
105 | { | 106 | { |
106 | return container_of(dev, struct enclosure_device, cdev); | 107 | return container_of(dev, struct enclosure_device, edev); |
107 | } | 108 | } |
108 | 109 | ||
109 | static inline struct enclosure_component * | 110 | static inline struct enclosure_component * |
110 | to_enclosure_component(struct class_device *dev) | 111 | to_enclosure_component(struct device *dev) |
111 | { | 112 | { |
112 | return container_of(dev, struct enclosure_component, cdev); | 113 | return container_of(dev, struct enclosure_component, cdev); |
113 | } | 114 | } |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 165734a2dd47..07ed56f7a767 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -443,7 +443,7 @@ enum link_pm { | |||
443 | MAX_PERFORMANCE, | 443 | MAX_PERFORMANCE, |
444 | MEDIUM_POWER, | 444 | MEDIUM_POWER, |
445 | }; | 445 | }; |
446 | extern struct class_device_attribute class_device_attr_link_power_management_policy; | 446 | extern struct device_attribute dev_attr_link_power_management_policy; |
447 | 447 | ||
448 | #ifdef CONFIG_ATA_SFF | 448 | #ifdef CONFIG_ATA_SFF |
449 | struct ata_ioports { | 449 | struct ata_ioports { |
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) \ |
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 | ||
diff --git a/include/linux/transport_class.h b/include/linux/transport_class.h index 6696cf79c4f7..eaec1ea9558e 100644 --- a/include/linux/transport_class.h +++ b/include/linux/transport_class.h | |||
@@ -17,11 +17,11 @@ struct transport_container; | |||
17 | struct transport_class { | 17 | struct transport_class { |
18 | struct class class; | 18 | struct class class; |
19 | int (*setup)(struct transport_container *, struct device *, | 19 | int (*setup)(struct transport_container *, struct device *, |
20 | struct class_device *); | 20 | struct device *); |
21 | int (*configure)(struct transport_container *, struct device *, | 21 | int (*configure)(struct transport_container *, struct device *, |
22 | struct class_device *); | 22 | struct device *); |
23 | int (*remove)(struct transport_container *, struct device *, | 23 | int (*remove)(struct transport_container *, struct device *, |
24 | struct class_device *); | 24 | struct device *); |
25 | }; | 25 | }; |
26 | 26 | ||
27 | #define DECLARE_TRANSPORT_CLASS(cls, nm, su, rm, cfg) \ | 27 | #define DECLARE_TRANSPORT_CLASS(cls, nm, su, rm, cfg) \ |
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index ab7acbe80960..b8b19e2f57bb 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
@@ -156,8 +156,8 @@ struct scsi_device { | |||
156 | 156 | ||
157 | int timeout; | 157 | int timeout; |
158 | 158 | ||
159 | struct device sdev_gendev; | 159 | struct device sdev_gendev, |
160 | struct class_device sdev_classdev; | 160 | sdev_dev; |
161 | 161 | ||
162 | struct execute_work ew; /* used to get process context on put */ | 162 | struct execute_work ew; /* used to get process context on put */ |
163 | 163 | ||
@@ -167,9 +167,9 @@ struct scsi_device { | |||
167 | #define to_scsi_device(d) \ | 167 | #define to_scsi_device(d) \ |
168 | container_of(d, struct scsi_device, sdev_gendev) | 168 | container_of(d, struct scsi_device, sdev_gendev) |
169 | #define class_to_sdev(d) \ | 169 | #define class_to_sdev(d) \ |
170 | container_of(d, struct scsi_device, sdev_classdev) | 170 | container_of(d, struct scsi_device, sdev_dev) |
171 | #define transport_class_to_sdev(class_dev) \ | 171 | #define transport_class_to_sdev(class_dev) \ |
172 | to_scsi_device(class_dev->dev) | 172 | to_scsi_device(class_dev->parent) |
173 | 173 | ||
174 | #define sdev_printk(prefix, sdev, fmt, a...) \ | 174 | #define sdev_printk(prefix, sdev, fmt, a...) \ |
175 | dev_printk(prefix, &(sdev)->sdev_gendev, fmt, ##a) | 175 | dev_printk(prefix, &(sdev)->sdev_gendev, fmt, ##a) |
@@ -220,7 +220,7 @@ static inline struct scsi_target *scsi_target(struct scsi_device *sdev) | |||
220 | return to_scsi_target(sdev->sdev_gendev.parent); | 220 | return to_scsi_target(sdev->sdev_gendev.parent); |
221 | } | 221 | } |
222 | #define transport_class_to_starget(class_dev) \ | 222 | #define transport_class_to_starget(class_dev) \ |
223 | to_scsi_target(class_dev->dev) | 223 | to_scsi_target(class_dev->parent) |
224 | 224 | ||
225 | #define starget_printk(prefix, starget, fmt, a...) \ | 225 | #define starget_printk(prefix, starget, fmt, a...) \ |
226 | dev_printk(prefix, &(starget)->dev, fmt, ##a) | 226 | dev_printk(prefix, &(starget)->dev, fmt, ##a) |
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 49132862bfaa..d967d6dc7a28 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
@@ -470,7 +470,7 @@ struct scsi_host_template { | |||
470 | /* | 470 | /* |
471 | * Pointer to the sysfs class properties for this host, NULL terminated. | 471 | * Pointer to the sysfs class properties for this host, NULL terminated. |
472 | */ | 472 | */ |
473 | struct class_device_attribute **shost_attrs; | 473 | struct device_attribute **shost_attrs; |
474 | 474 | ||
475 | /* | 475 | /* |
476 | * Pointer to the SCSI device properties for this host, NULL terminated. | 476 | * Pointer to the SCSI device properties for this host, NULL terminated. |
@@ -655,8 +655,7 @@ struct Scsi_Host { | |||
655 | enum scsi_host_state shost_state; | 655 | enum scsi_host_state shost_state; |
656 | 656 | ||
657 | /* ldm bits */ | 657 | /* ldm bits */ |
658 | struct device shost_gendev; | 658 | struct device shost_gendev, shost_dev; |
659 | struct class_device shost_classdev; | ||
660 | 659 | ||
661 | /* | 660 | /* |
662 | * List of hosts per template. | 661 | * List of hosts per template. |
@@ -683,7 +682,7 @@ struct Scsi_Host { | |||
683 | }; | 682 | }; |
684 | 683 | ||
685 | #define class_to_shost(d) \ | 684 | #define class_to_shost(d) \ |
686 | container_of(d, struct Scsi_Host, shost_classdev) | 685 | container_of(d, struct Scsi_Host, shost_dev) |
687 | 686 | ||
688 | #define shost_printk(prefix, shost, fmt, a...) \ | 687 | #define shost_printk(prefix, shost, fmt, a...) \ |
689 | dev_printk(prefix, &(shost)->shost_gendev, fmt, ##a) | 688 | dev_printk(prefix, &(shost)->shost_gendev, fmt, ##a) |
diff --git a/include/scsi/scsi_transport.h b/include/scsi/scsi_transport.h index 0dfef752f0e2..490bd13a634c 100644 --- a/include/scsi/scsi_transport.h +++ b/include/scsi/scsi_transport.h | |||
@@ -80,7 +80,7 @@ struct scsi_transport_template { | |||
80 | }; | 80 | }; |
81 | 81 | ||
82 | #define transport_class_to_shost(tc) \ | 82 | #define transport_class_to_shost(tc) \ |
83 | dev_to_shost((tc)->dev) | 83 | dev_to_shost((tc)->parent) |
84 | 84 | ||
85 | 85 | ||
86 | /* Private area maintenance. The driver requested allocations come | 86 | /* Private area maintenance. The driver requested allocations come |
diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h index 4769efd4db24..06f72bab9df0 100644 --- a/include/scsi/scsi_transport_fc.h +++ b/include/scsi/scsi_transport_fc.h | |||
@@ -163,8 +163,8 @@ enum fc_tgtid_binding_type { | |||
163 | 163 | ||
164 | 164 | ||
165 | /* Macro for use in defining Virtual Port attributes */ | 165 | /* Macro for use in defining Virtual Port attributes */ |
166 | #define FC_VPORT_ATTR(_name,_mode,_show,_store) \ | 166 | #define FC_VPORT_ATTR(_name,_mode,_show,_store) \ |
167 | struct class_device_attribute class_device_attr_vport_##_name = \ | 167 | struct device_attribute dev_attr_vport_##_name = \ |
168 | __ATTR(_name,_mode,_show,_store) | 168 | __ATTR(_name,_mode,_show,_store) |
169 | 169 | ||
170 | 170 | ||
@@ -234,8 +234,8 @@ struct fc_vport { | |||
234 | 234 | ||
235 | #define dev_to_vport(d) \ | 235 | #define dev_to_vport(d) \ |
236 | container_of(d, struct fc_vport, dev) | 236 | container_of(d, struct fc_vport, dev) |
237 | #define transport_class_to_vport(classdev) \ | 237 | #define transport_class_to_vport(dev) \ |
238 | dev_to_vport(classdev->dev) | 238 | dev_to_vport(dev->parent) |
239 | #define vport_to_shost(v) \ | 239 | #define vport_to_shost(v) \ |
240 | (v->shost) | 240 | (v->shost) |
241 | #define vport_to_shost_channel(v) \ | 241 | #define vport_to_shost_channel(v) \ |
@@ -271,7 +271,7 @@ struct fc_rport_identifiers { | |||
271 | 271 | ||
272 | /* Macro for use in defining Remote Port attributes */ | 272 | /* Macro for use in defining Remote Port attributes */ |
273 | #define FC_RPORT_ATTR(_name,_mode,_show,_store) \ | 273 | #define FC_RPORT_ATTR(_name,_mode,_show,_store) \ |
274 | struct class_device_attribute class_device_attr_rport_##_name = \ | 274 | struct device_attribute dev_attr_rport_##_name = \ |
275 | __ATTR(_name,_mode,_show,_store) | 275 | __ATTR(_name,_mode,_show,_store) |
276 | 276 | ||
277 | 277 | ||
@@ -341,8 +341,8 @@ struct fc_rport { /* aka fc_starget_attrs */ | |||
341 | 341 | ||
342 | #define dev_to_rport(d) \ | 342 | #define dev_to_rport(d) \ |
343 | container_of(d, struct fc_rport, dev) | 343 | container_of(d, struct fc_rport, dev) |
344 | #define transport_class_to_rport(classdev) \ | 344 | #define transport_class_to_rport(dev) \ |
345 | dev_to_rport(classdev->dev) | 345 | dev_to_rport(dev->parent) |
346 | #define rport_to_shost(r) \ | 346 | #define rport_to_shost(r) \ |
347 | dev_to_shost(r->dev.parent) | 347 | dev_to_shost(r->dev.parent) |
348 | 348 | ||
diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h index 09125fa95b93..61ad3594aad6 100644 --- a/include/scsi/scsi_transport_sas.h +++ b/include/scsi/scsi_transport_sas.h | |||
@@ -80,8 +80,8 @@ struct sas_phy { | |||
80 | 80 | ||
81 | #define dev_to_phy(d) \ | 81 | #define dev_to_phy(d) \ |
82 | container_of((d), struct sas_phy, dev) | 82 | container_of((d), struct sas_phy, dev) |
83 | #define transport_class_to_phy(cdev) \ | 83 | #define transport_class_to_phy(dev) \ |
84 | dev_to_phy((cdev)->dev) | 84 | dev_to_phy((dev)->parent) |
85 | #define phy_to_shost(phy) \ | 85 | #define phy_to_shost(phy) \ |
86 | dev_to_shost((phy)->dev.parent) | 86 | dev_to_shost((phy)->dev.parent) |
87 | 87 | ||
@@ -96,8 +96,8 @@ struct sas_rphy { | |||
96 | 96 | ||
97 | #define dev_to_rphy(d) \ | 97 | #define dev_to_rphy(d) \ |
98 | container_of((d), struct sas_rphy, dev) | 98 | container_of((d), struct sas_rphy, dev) |
99 | #define transport_class_to_rphy(cdev) \ | 99 | #define transport_class_to_rphy(dev) \ |
100 | dev_to_rphy((cdev)->dev) | 100 | dev_to_rphy((dev)->parent) |
101 | #define rphy_to_shost(rphy) \ | 101 | #define rphy_to_shost(rphy) \ |
102 | dev_to_shost((rphy)->dev.parent) | 102 | dev_to_shost((rphy)->dev.parent) |
103 | #define target_to_rphy(targ) \ | 103 | #define target_to_rphy(targ) \ |
@@ -152,8 +152,8 @@ struct sas_port { | |||
152 | 152 | ||
153 | #define dev_to_sas_port(d) \ | 153 | #define dev_to_sas_port(d) \ |
154 | container_of((d), struct sas_port, dev) | 154 | container_of((d), struct sas_port, dev) |
155 | #define transport_class_to_sas_port(cdev) \ | 155 | #define transport_class_to_sas_port(dev) \ |
156 | dev_to_sas_port((cdev)->dev) | 156 | dev_to_sas_port((dev)->parent) |
157 | 157 | ||
158 | struct sas_phy_linkrates { | 158 | struct sas_phy_linkrates { |
159 | enum sas_linkrate maximum_linkrate; | 159 | enum sas_linkrate maximum_linkrate; |
diff --git a/include/scsi/sd.h b/include/scsi/sd.h index 8ea9f7358ac1..4f032d48cb6e 100644 --- a/include/scsi/sd.h +++ b/include/scsi/sd.h | |||
@@ -34,7 +34,7 @@ | |||
34 | struct scsi_disk { | 34 | struct scsi_disk { |
35 | struct scsi_driver *driver; /* always &sd_template */ | 35 | struct scsi_driver *driver; /* always &sd_template */ |
36 | struct scsi_device *device; | 36 | struct scsi_device *device; |
37 | struct class_device cdev; | 37 | struct device dev; |
38 | struct gendisk *disk; | 38 | struct gendisk *disk; |
39 | unsigned int openers; /* protected by BKL for now, yuck */ | 39 | unsigned int openers; /* protected by BKL for now, yuck */ |
40 | sector_t capacity; /* size in 512-byte sectors */ | 40 | sector_t capacity; /* size in 512-byte sectors */ |
@@ -46,7 +46,7 @@ struct scsi_disk { | |||
46 | unsigned RCD : 1; /* state of disk RCD bit, unused */ | 46 | unsigned RCD : 1; /* state of disk RCD bit, unused */ |
47 | unsigned DPOFUA : 1; /* state of disk DPOFUA bit */ | 47 | unsigned DPOFUA : 1; /* state of disk DPOFUA bit */ |
48 | }; | 48 | }; |
49 | #define to_scsi_disk(obj) container_of(obj,struct scsi_disk,cdev) | 49 | #define to_scsi_disk(obj) container_of(obj,struct scsi_disk,dev) |
50 | 50 | ||
51 | #define sd_printk(prefix, sdsk, fmt, a...) \ | 51 | #define sd_printk(prefix, sdsk, fmt, a...) \ |
52 | (sdsk)->disk ? \ | 52 | (sdsk)->disk ? \ |