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/asm-sparc64/of_device.h | |
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/asm-sparc64/of_device.h')
-rw-r--r-- | include/asm-sparc64/of_device.h | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/include/asm-sparc64/of_device.h b/include/asm-sparc64/of_device.h index 60e9173c9ac..68048cb2068 100644 --- a/include/asm-sparc64/of_device.h +++ b/include/asm-sparc64/of_device.h | |||
@@ -3,9 +3,9 @@ | |||
3 | #ifdef __KERNEL__ | 3 | #ifdef __KERNEL__ |
4 | 4 | ||
5 | #include <linux/device.h> | 5 | #include <linux/device.h> |
6 | #include <linux/of.h> | ||
6 | #include <linux/mod_devicetable.h> | 7 | #include <linux/mod_devicetable.h> |
7 | #include <asm/openprom.h> | 8 | #include <asm/openprom.h> |
8 | #include <asm/prom.h> | ||
9 | 9 | ||
10 | extern struct bus_type isa_bus_type; | 10 | extern struct bus_type isa_bus_type; |
11 | extern struct bus_type ebus_bus_type; | 11 | extern struct bus_type ebus_bus_type; |
@@ -31,19 +31,12 @@ struct of_device | |||
31 | int portid; | 31 | int portid; |
32 | int clock_freq; | 32 | int clock_freq; |
33 | }; | 33 | }; |
34 | #define to_of_device(d) container_of(d, struct of_device, dev) | ||
35 | 34 | ||
36 | extern void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name); | 35 | extern void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name); |
37 | extern void of_iounmap(struct resource *res, void __iomem *base, unsigned long size); | 36 | extern void of_iounmap(struct resource *res, void __iomem *base, unsigned long size); |
38 | 37 | ||
39 | extern struct of_device *of_find_device_by_node(struct device_node *); | 38 | extern struct of_device *of_find_device_by_node(struct device_node *); |
40 | 39 | ||
41 | extern const struct of_device_id *of_match_device( | ||
42 | const struct of_device_id *matches, const struct of_device *dev); | ||
43 | |||
44 | extern struct of_device *of_dev_get(struct of_device *dev); | ||
45 | extern void of_dev_put(struct of_device *dev); | ||
46 | |||
47 | /* | 40 | /* |
48 | * An of_platform_driver driver is attached to a basic of_device on | 41 | * An of_platform_driver driver is attached to a basic of_device on |
49 | * the ISA, EBUS, and SBUS busses on sparc64. | 42 | * the ISA, EBUS, and SBUS busses on sparc64. |
@@ -68,13 +61,13 @@ struct of_platform_driver | |||
68 | extern int of_register_driver(struct of_platform_driver *drv, | 61 | extern int of_register_driver(struct of_platform_driver *drv, |
69 | struct bus_type *bus); | 62 | struct bus_type *bus); |
70 | extern void of_unregister_driver(struct of_platform_driver *drv); | 63 | extern void of_unregister_driver(struct of_platform_driver *drv); |
71 | extern int of_device_register(struct of_device *ofdev); | ||
72 | extern void of_device_unregister(struct of_device *ofdev); | ||
73 | extern struct of_device *of_platform_device_create(struct device_node *np, | 64 | extern struct of_device *of_platform_device_create(struct device_node *np, |
74 | const char *bus_id, | 65 | const char *bus_id, |
75 | struct device *parent, | 66 | struct device *parent, |
76 | struct bus_type *bus); | 67 | struct bus_type *bus); |
77 | extern void of_release_dev(struct device *dev); | 68 | |
69 | /* This is just here during the transition */ | ||
70 | #include <linux/of_device.h> | ||
78 | 71 | ||
79 | #endif /* __KERNEL__ */ | 72 | #endif /* __KERNEL__ */ |
80 | #endif /* _ASM_SPARC64_OF_DEVICE_H */ | 73 | #endif /* _ASM_SPARC64_OF_DEVICE_H */ |