-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathmybus.h
More file actions
36 lines (28 loc) · 776 Bytes
/
Copy pathmybus.h
File metadata and controls
36 lines (28 loc) · 776 Bytes
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
35
36
#ifndef MYBUS_H
#define MYBUS_H
#include <linux/module.h>
#include <linux/device.h>
#include <linux/init.h>
#include <linux/string.h>
/* ****************************
* Device structure
* **************************** */
struct my_device {
char *name;
struct device dev;
};
/* ****************************
* Driver structure
* **************************** */
struct my_driver {
struct device_driver driver;
};
/* ****************************
* Bus registration APIs
* **************************** */
extern struct bus_type my_bus_type;
int my_register_device(struct my_device *dev);
void my_unregister_device(struct my_device *dev);
int my_register_driver(struct my_driver *drv);
void my_unregister_driver(struct my_driver *drv);
#endif /* MYBUS_H */