diff options
Diffstat (limited to 'include/linux/maple.h')
-rw-r--r-- | include/linux/maple.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/include/linux/maple.h b/include/linux/maple.h index 523a286bb477..c23d3f51ba40 100644 --- a/include/linux/maple.h +++ b/include/linux/maple.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define __LINUX_MAPLE_H | 2 | #define __LINUX_MAPLE_H |
3 | 3 | ||
4 | #include <linux/device.h> | 4 | #include <linux/device.h> |
5 | #include <mach/maple.h> | ||
5 | 6 | ||
6 | extern struct bus_type maple_bus_type; | 7 | extern struct bus_type maple_bus_type; |
7 | 8 | ||
@@ -33,6 +34,7 @@ struct mapleq { | |||
33 | void *sendbuf, *recvbuf, *recvbufdcsp; | 34 | void *sendbuf, *recvbuf, *recvbufdcsp; |
34 | unsigned char length; | 35 | unsigned char length; |
35 | enum maple_code command; | 36 | enum maple_code command; |
37 | struct mutex mutex; | ||
36 | }; | 38 | }; |
37 | 39 | ||
38 | struct maple_devinfo { | 40 | struct maple_devinfo { |
@@ -49,7 +51,6 @@ struct maple_devinfo { | |||
49 | struct maple_device { | 51 | struct maple_device { |
50 | struct maple_driver *driver; | 52 | struct maple_driver *driver; |
51 | struct mapleq *mq; | 53 | struct mapleq *mq; |
52 | void *private_data; | ||
53 | void (*callback) (struct mapleq * mq); | 54 | void (*callback) (struct mapleq * mq); |
54 | unsigned long when, interval, function; | 55 | unsigned long when, interval, function; |
55 | struct maple_devinfo devinfo; | 56 | struct maple_devinfo devinfo; |
@@ -68,10 +69,17 @@ void maple_getcond_callback(struct maple_device *dev, | |||
68 | void (*callback) (struct mapleq * mq), | 69 | void (*callback) (struct mapleq * mq), |
69 | unsigned long interval, | 70 | unsigned long interval, |
70 | unsigned long function); | 71 | unsigned long function); |
71 | int maple_driver_register(struct device_driver *drv); | 72 | int maple_driver_register(struct maple_driver *); |
72 | void maple_add_packet(struct mapleq *mq); | 73 | void maple_driver_unregister(struct maple_driver *); |
74 | |||
75 | int maple_add_packet_sleeps(struct maple_device *mdev, u32 function, | ||
76 | u32 command, u32 length, void *data); | ||
77 | void maple_clear_dev(struct maple_device *mdev); | ||
73 | 78 | ||
74 | #define to_maple_dev(n) container_of(n, struct maple_device, dev) | 79 | #define to_maple_dev(n) container_of(n, struct maple_device, dev) |
75 | #define to_maple_driver(n) container_of(n, struct maple_driver, drv) | 80 | #define to_maple_driver(n) container_of(n, struct maple_driver, drv) |
76 | 81 | ||
82 | #define maple_get_drvdata(d) dev_get_drvdata(&(d)->dev) | ||
83 | #define maple_set_drvdata(d,p) dev_set_drvdata(&(d)->dev, (p)) | ||
84 | |||
77 | #endif /* __LINUX_MAPLE_H */ | 85 | #endif /* __LINUX_MAPLE_H */ |