blob: c3b8dc98b8a739812f78b5311b38bf18d671a8c7 [file] [log] [blame]
Ben Dooksa1bdc7a2005-10-13 17:54:41 +01001
2/* initialisation functions */
3
4extern int devices_init(void);
5extern int buses_init(void);
6extern int classes_init(void);
7extern int firmware_init(void);
Michael Holzheu40394832006-05-09 12:53:49 +02008#ifdef CONFIG_SYS_HYPERVISOR
9extern int hypervisor_init(void);
10#else
11static inline int hypervisor_init(void) { return 0; }
12#endif
Ben Dooksa1bdc7a2005-10-13 17:54:41 +010013extern int platform_bus_init(void);
14extern int system_bus_init(void);
15extern int cpu_dev_init(void);
16extern int attribute_container_init(void);
17
Linus Torvalds1da177e2005-04-16 15:20:36 -070018extern int bus_add_device(struct device * dev);
Kay Sievers53877d02006-04-04 20:42:26 +020019extern void bus_attach_device(struct device * dev);
Linus Torvalds1da177e2005-04-16 15:20:36 -070020extern void bus_remove_device(struct device * dev);
Greg Kroah-Hartman17407572006-05-02 16:59:59 +020021extern struct bus_type *get_bus(struct bus_type * bus);
22extern void put_bus(struct bus_type * bus);
Linus Torvalds1da177e2005-04-16 15:20:36 -070023
24extern int bus_add_driver(struct device_driver *);
25extern void bus_remove_driver(struct device_driver *);
26
mochel@digitalimplant.org07e4a3e2005-03-21 10:52:54 -080027extern void driver_detach(struct device_driver * drv);
Greg Kroah-Hartmanafdce752005-06-22 16:09:05 -070028extern int driver_probe_device(struct device_driver *, struct device *);
mochel@digitalimplant.org07e4a3e2005-03-21 10:52:54 -080029
Adrian Bunkf67d1152006-01-19 17:30:17 +010030extern void sysdev_shutdown(void);
31extern int sysdev_suspend(pm_message_t state);
32extern int sysdev_resume(void);
33
Linus Torvalds1da177e2005-04-16 15:20:36 -070034static inline struct class_device *to_class_dev(struct kobject *obj)
35{
36 return container_of(obj, struct class_device, kobj);
37}
38
39static inline
40struct class_device_attribute *to_class_dev_attr(struct attribute *_attr)
41{
42 return container_of(_attr, struct class_device_attribute, attr);
43}
44
Greg Kroah-Hartmanaa49b912006-06-20 13:59:20 -070045extern char *make_class_name(const char *name, struct kobject *kobj);
Linus Torvalds1da177e2005-04-16 15:20:36 -070046