diff options
Diffstat (limited to 'include/linux/ipaq-sleeve.h')
-rw-r--r-- | include/linux/ipaq-sleeve.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/include/linux/ipaq-sleeve.h b/include/linux/ipaq-sleeve.h new file mode 100644 index 000000000000..fb669fad0c4e --- /dev/null +++ b/include/linux/ipaq-sleeve.h @@ -0,0 +1,34 @@ +#ifndef LINUX_IPAQ_SLEEVE_H +#define LINUX_IPAQ_SLEEVE_H + +#include <linux/device.h> +#include <linux/mod_devicetable.h> + +struct ipaq_option_device { + struct ipaq_option_id id; + struct device dev; +}; +#define to_ipaq_option_device(x) container_of(x, struct ipaq_option_device, dev) + +struct ipaq_option_driver { + const struct ipaq_option_id *id_table; + struct device_driver driver; +}; + +extern struct bus_type ipaq_option_sleeve_bus; + +int ipaq_option_device_add(struct device *parent, struct ipaq_option_id id); +void ipaq_option_device_del(void); + +static inline int ipaq_option_driver_register(struct ipaq_option_driver *drv) +{ + drv->driver.bus = &ipaq_option_sleeve_bus; + return driver_register(&drv->driver); +} + +static inline void ipaq_option_driver_unregister(struct ipaq_option_driver *drv) +{ + driver_unregister(&drv->driver); +} + +#endif |