diff options
author | Adrian McMenamin <adrian@mcmen.demon.co.uk> | 2008-07-29 09:10:56 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-07-29 09:10:56 -0400 |
commit | 1795cf48b322b4d19230a40dbe7181acedd34a94 (patch) | |
tree | 5d1426c12687f1c80cb648da2f105714c9819001 /include/linux/maple.h | |
parent | 0764bff445bb13cd17e41b6ab196ef83c23c6c17 (diff) |
sh/maple: clean maple bus code
This patch cleans up the handling of the maple bus queue to remove
the risk of races when adding packets. It also removes references to the
redundant connect and disconnect functions.
Signed-off-by: Adrian McMenamin <adrian@mcmen.demon.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/linux/maple.h')
-rw-r--r-- | include/linux/maple.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/maple.h b/include/linux/maple.h index 523a286bb477..c853b1066018 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 { |
@@ -69,7 +71,9 @@ void maple_getcond_callback(struct maple_device *dev, | |||
69 | unsigned long interval, | 71 | unsigned long interval, |
70 | unsigned long function); | 72 | unsigned long function); |
71 | int maple_driver_register(struct device_driver *drv); | 73 | int maple_driver_register(struct device_driver *drv); |
72 | void maple_add_packet(struct mapleq *mq); | 74 | int maple_add_packet_sleeps(struct maple_device *mdev, u32 function, |
75 | u32 command, u32 length, void *data); | ||
76 | void maple_clear_dev(struct maple_device *mdev); | ||
73 | 77 | ||
74 | #define to_maple_dev(n) container_of(n, struct maple_device, dev) | 78 | #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) | 79 | #define to_maple_driver(n) container_of(n, struct maple_driver, drv) |