diff options
author | Adrian McMenamin <adrian@mcmen.demon.co.uk> | 2008-07-29 22:10:56 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-07-29 22:10:56 +0900 |
commit | 1795cf48b322b4d19230a40dbe7181acedd34a94 (patch) | |
tree | 5d1426c12687f1c80cb648da2f105714c9819001 /include | |
parent | 0764bff445bb13cd17e41b6ab196ef83c23c6c17 (diff) | |
download | op-kernel-dev-1795cf48b322b4d19230a40dbe7181acedd34a94.zip op-kernel-dev-1795cf48b322b4d19230a40dbe7181acedd34a94.tar.gz |
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')
-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 523a286..c853b10 100644 --- a/include/linux/maple.h +++ b/include/linux/maple.h @@ -2,6 +2,7 @@ #define __LINUX_MAPLE_H #include <linux/device.h> +#include <mach/maple.h> extern struct bus_type maple_bus_type; @@ -33,6 +34,7 @@ struct mapleq { void *sendbuf, *recvbuf, *recvbufdcsp; unsigned char length; enum maple_code command; + struct mutex mutex; }; struct maple_devinfo { @@ -69,7 +71,9 @@ void maple_getcond_callback(struct maple_device *dev, unsigned long interval, unsigned long function); int maple_driver_register(struct device_driver *drv); -void maple_add_packet(struct mapleq *mq); +int maple_add_packet_sleeps(struct maple_device *mdev, u32 function, + u32 command, u32 length, void *data); +void maple_clear_dev(struct maple_device *mdev); #define to_maple_dev(n) container_of(n, struct maple_device, dev) #define to_maple_driver(n) container_of(n, struct maple_driver, drv) |