Commit 1795cf48 authored by Adrian McMenamin's avatar Adrian McMenamin Committed by Paul Mundt

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: default avatarAdrian McMenamin <adrian@mcmen.demon.co.uk>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 0764bff4
This diff is collapsed.
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#define __LINUX_MAPLE_H #define __LINUX_MAPLE_H
#include <linux/device.h> #include <linux/device.h>
#include <mach/maple.h>
extern struct bus_type maple_bus_type; extern struct bus_type maple_bus_type;
...@@ -33,6 +34,7 @@ struct mapleq { ...@@ -33,6 +34,7 @@ struct mapleq {
void *sendbuf, *recvbuf, *recvbufdcsp; void *sendbuf, *recvbuf, *recvbufdcsp;
unsigned char length; unsigned char length;
enum maple_code command; enum maple_code command;
struct mutex mutex;
}; };
struct maple_devinfo { struct maple_devinfo {
...@@ -69,7 +71,9 @@ void maple_getcond_callback(struct maple_device *dev, ...@@ -69,7 +71,9 @@ void maple_getcond_callback(struct maple_device *dev,
unsigned long interval, unsigned long interval,
unsigned long function); unsigned long function);
int maple_driver_register(struct device_driver *drv); 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_dev(n) container_of(n, struct maple_device, dev)
#define to_maple_driver(n) container_of(n, struct maple_driver, drv) #define to_maple_driver(n) container_of(n, struct maple_driver, drv)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment