aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/attribute_container.h28
-rw-r--r--include/linux/bsg.h2
-rw-r--r--include/linux/enclosure.h11
-rw-r--r--include/linux/libata.h2
-rw-r--r--include/linux/raid_class.h12
-rw-r--r--include/linux/transport_class.h6
6 files changed, 31 insertions, 30 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 @@
/*
- * class_container.h - a generic container for all classes
+ * attribute_container.h - a generic container for all classes
*
* Copyright (c) 2005 - James Bottomley <James.Bottomley@steeleye.com>
*
@@ -18,7 +18,7 @@ struct attribute_container {
struct klist containers;
struct class *class;
struct attribute_group *grp;
- struct class_device_attribute **attrs;
+ struct device_attribute **attrs;
int (*match)(struct attribute_container *, struct device *);
#define ATTRIBUTE_CONTAINER_NO_CLASSDEVS 0x01
unsigned long flags;
@@ -41,31 +41,31 @@ int __must_check attribute_container_unregister(struct attribute_container *cont
void attribute_container_create_device(struct device *dev,
int (*fn)(struct attribute_container *,
struct device *,
- struct class_device *));
+ struct device *));
void attribute_container_add_device(struct device *dev,
int (*fn)(struct attribute_container *,
struct device *,
- struct class_device *));
+ struct device *));
void attribute_container_remove_device(struct device *dev,
void (*fn)(struct attribute_container *,
struct device *,
- struct class_device *));
+ struct device *));
void attribute_container_device_trigger(struct device *dev,
int (*fn)(struct attribute_container *,
struct device *,
- struct class_device *));
+ struct device *));
void attribute_container_trigger(struct device *dev,
int (*fn)(struct attribute_container *,
struct device *));
-int attribute_container_add_attrs(struct class_device *classdev);
-int attribute_container_add_class_device(struct class_device *classdev);
+int attribute_container_add_attrs(struct device *classdev);
+int attribute_container_add_class_device(struct device *classdev);
int attribute_container_add_class_device_adapter(struct attribute_container *cont,
struct device *dev,
- struct class_device *classdev);
-void attribute_container_remove_attrs(struct class_device *classdev);
-void attribute_container_class_device_del(struct class_device *classdev);
-struct attribute_container *attribute_container_classdev_to_container(struct class_device *);
-struct class_device *attribute_container_find_class_device(struct attribute_container *, struct device *);
-struct class_device_attribute **attribute_container_classdev_to_attrs(const struct class_device *classdev);
+ struct device *classdev);
+void attribute_container_remove_attrs(struct device *classdev);
+void attribute_container_class_device_del(struct device *classdev);
+struct attribute_container *attribute_container_classdev_to_container(struct device *);
+struct device *attribute_container_find_class_device(struct attribute_container *, struct device *);
+struct device_attribute **attribute_container_classdev_to_attrs(const struct device *classdev);
#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 {
#if defined(CONFIG_BLK_DEV_BSG)
struct bsg_class_device {
- struct class_device *class_dev;
+ struct device *class_dev;
struct device *dev;
int minor;
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 {
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);
}
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 {
MAX_PERFORMANCE,
MEDIUM_POWER,
};
-extern struct class_device_attribute class_device_attr_link_power_management_policy;
+extern struct device_attribute dev_attr_link_power_management_policy;
#ifdef CONFIG_ATA_SFF
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 {
#define DEFINE_RAID_ATTRIBUTE(type, attr) \
static inline void \
raid_set_##attr(struct raid_template *r, struct device *dev, type value) { \
- struct class_device *cdev = \
+ struct device *device = \
attribute_container_find_class_device(&r->raid_attrs.ac, dev);\
struct raid_data *rd; \
- BUG_ON(!cdev); \
- rd = class_get_devdata(cdev); \
+ BUG_ON(!device); \
+ rd = dev_get_drvdata(device); \
rd->attr = value; \
} \
static inline type \
raid_get_##attr(struct raid_template *r, struct device *dev) { \
- struct class_device *cdev = \
+ struct device *device = \
attribute_container_find_class_device(&r->raid_attrs.ac, dev);\
struct raid_data *rd; \
- BUG_ON(!cdev); \
- rd = class_get_devdata(cdev); \
+ BUG_ON(!device); \
+ rd = dev_get_drvdata(device); \
return rd->attr; \
}
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;
struct transport_class {
struct class class;
int (*setup)(struct transport_container *, struct device *,
- struct class_device *);
+ struct device *);
int (*configure)(struct transport_container *, struct device *,
- struct class_device *);
+ struct device *);
int (*remove)(struct transport_container *, struct device *,
- struct class_device *);
+ struct device *);
};
#define DECLARE_TRANSPORT_CLASS(cls, nm, su, rm, cfg) \