1
2
3
4 #ifndef __SOUNDWIRE_TYPES_H
5 #define __SOUNDWIRE_TYPES_H
6
7 extern struct bus_type sdw_bus_type;
8
9 #define drv_to_sdw_driver(_drv) container_of(_drv, struct sdw_driver, driver)
10
11 #define sdw_register_driver(drv) \
12 __sdw_register_driver(drv, THIS_MODULE)
13
14 int __sdw_register_driver(struct sdw_driver *drv, struct module *owner);
15 void sdw_unregister_driver(struct sdw_driver *drv);
16
17 int sdw_slave_modalias(const struct sdw_slave *slave, char *buf, size_t size);
18
19
20
21
22
23
24
25
26
27 #define module_sdw_driver(__sdw_driver) \
28 module_driver(__sdw_driver, sdw_register_driver, \
29 sdw_unregister_driver)
30 #endif