blob: fb669fad0c4e6c44353a1e621fc7f9bbb15fa39b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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
|