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>
This commit is contained in:
Tony Jones 2008-02-22 00:13:36 +01:00 committed by Greg Kroah-Hartman
parent 56d110e852
commit ee959b00c3
55 changed files with 1756 additions and 1505 deletions

View file

@ -82,7 +82,8 @@ struct enclosure_component_callbacks {
struct enclosure_component {
void *scratch;
struct class_device cdev;
struct device cdev;
struct device *dev;
enum enclosure_component_type type;
int number;
int fault;
@ -94,20 +95,20 @@ struct enclosure_component {
struct enclosure_device {
void *scratch;
struct list_head node;
struct class_device cdev;
struct device edev;
struct enclosure_component_callbacks *cb;
int components;
struct enclosure_component component[0];
};
static inline struct enclosure_device *
to_enclosure_device(struct class_device *dev)
to_enclosure_device(struct device *dev)
{
return container_of(dev, struct enclosure_device, cdev);
return container_of(dev, struct enclosure_device, edev);
}
static inline struct enclosure_component *
to_enclosure_component(struct class_device *dev)
to_enclosure_component(struct device *dev)
{
return container_of(dev, struct enclosure_component, cdev);
}