summaryrefslogtreecommitdiffstats
path: root/drivers/w1/w1.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@starflyer.(none)>2005-09-25 13:14:45 +1000
committerDave Airlie <airlied@linux.ie>2005-09-25 13:14:45 +1000
commit4e0c1159d83a658d1ffba5bc3442f4ec4cadb436 (patch)
tree36a5079ba7ba9b9e0f2f633356705b980940eac4 /drivers/w1/w1.h
parentea98a92ff18c03bf7f4d21536986cbbcb4c10cd9 (diff)
parentef6bd6eb90ad72ee8ee7ba8b271f27102e9a90c1 (diff)
downloadop-kernel-dev-4e0c1159d83a658d1ffba5bc3442f4ec4cadb436.zip
op-kernel-dev-4e0c1159d83a658d1ffba5bc3442f4ec4cadb436.tar.gz
update from upstream
Diffstat (limited to 'drivers/w1/w1.h')
-rw-r--r--drivers/w1/w1.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/drivers/w1/w1.h b/drivers/w1/w1.h
index 4f0a986..d890078 100644
--- a/drivers/w1/w1.h
+++ b/drivers/w1/w1.h
@@ -75,11 +75,9 @@ struct w1_slave
struct w1_master *master;
struct w1_family *family;
+ void *family_data;
struct device dev;
- struct completion dev_released;
-
- struct bin_attribute attr_bin;
- struct device_attribute attr_name;
+ struct completion released;
};
typedef void (* w1_slave_found_callback)(unsigned long, u64);
@@ -179,7 +177,6 @@ struct w1_master
struct device_driver *driver;
struct device dev;
- struct completion dev_released;
struct completion dev_exited;
struct w1_bus_master *bus_master;
@@ -191,6 +188,21 @@ struct w1_master
int w1_create_master_attributes(struct w1_master *);
void w1_search(struct w1_master *dev, w1_slave_found_callback cb);
+static inline struct w1_slave* dev_to_w1_slave(struct device *dev)
+{
+ return container_of(dev, struct w1_slave, dev);
+}
+
+static inline struct w1_slave* kobj_to_w1_slave(struct kobject *kobj)
+{
+ return dev_to_w1_slave(container_of(kobj, struct device, kobj));
+}
+
+static inline struct w1_master* dev_to_w1_master(struct device *dev)
+{
+ return container_of(dev, struct w1_master, dev);
+}
+
#endif /* __KERNEL__ */
#endif /* __W1_H */
OpenPOWER on IntegriCloud