diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2007-05-01 02:49:51 -0400 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2007-07-19 23:41:56 -0400 |
commit | f898f8dbcec4848cddb8c5be2d0affd75779ebe2 (patch) | |
tree | 3ebbce02c605d9fc49bec8b1f5b971facd2c2e67 /include/linux | |
parent | f85ff3056cefdf4635ebf98b30e9a7d86521567f (diff) |
Begin consolidation of of_device.h
This just moves the common stuff from the arch of_device.h files to
linux/of_device.h.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Paul Mackerras <paulus@samba.org>
Acked-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/of_device.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/linux/of_device.h b/include/linux/of_device.h new file mode 100644 index 000000000000..91bf84b9d144 --- /dev/null +++ b/include/linux/of_device.h | |||
@@ -0,0 +1,26 @@ | |||
1 | #ifndef _LINUX_OF_DEVICE_H | ||
2 | #define _LINUX_OF_DEVICE_H | ||
3 | #ifdef __KERNEL__ | ||
4 | |||
5 | #include <linux/device.h> | ||
6 | #include <linux/of.h> | ||
7 | #include <linux/mod_devicetable.h> | ||
8 | |||
9 | #include <asm/of_device.h> | ||
10 | |||
11 | #define to_of_device(d) container_of(d, struct of_device, dev) | ||
12 | |||
13 | extern const struct of_device_id *of_match_node( | ||
14 | const struct of_device_id *matches, const struct device_node *node); | ||
15 | extern const struct of_device_id *of_match_device( | ||
16 | const struct of_device_id *matches, const struct of_device *dev); | ||
17 | |||
18 | extern struct of_device *of_dev_get(struct of_device *dev); | ||
19 | extern void of_dev_put(struct of_device *dev); | ||
20 | |||
21 | extern int of_device_register(struct of_device *ofdev); | ||
22 | extern void of_device_unregister(struct of_device *ofdev); | ||
23 | extern void of_release_dev(struct device *dev); | ||
24 | |||
25 | #endif /* __KERNEL__ */ | ||
26 | #endif /* _LINUX_OF_DEVICE_H */ | ||