#ifndef LINUX_IPAQ_SLEEVE_H #define LINUX_IPAQ_SLEEVE_H #include #include struct ipaq_option_device { struct ipaq_option_id id; const char *description; 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, const char *description); 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