aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/dt3155v4l
diff options
context:
space:
mode:
authorMarin Mitov <mitov@issp.bas.bg>2010-05-09 14:50:40 +0300
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-11 15:16:08 -0700
commitb8aab1278147e3b067903983a835ef3c68281b13 (patch)
treebe0b5331674e5572b3bac8a633da055e9838c302 /drivers/staging/dt3155v4l
parentStaging: panel: change asm/uaccess.h to linux/uaccess.h (diff)
downloadlinux-dev-b8aab1278147e3b067903983a835ef3c68281b13.tar.xz
linux-dev-b8aab1278147e3b067903983a835ef3c68281b13.zip
Staging: dt3155v4l: correcting a bug
dt3155v4l driver, as in -rc6-next-20100506 has a BUG. When it modifies q->int_ops structure in videobuf-dma-contig module the change is visible for all other modules using it. Make a local copy of this structure and use its modification to solve the bug. Signed-off-by: Marin Mitov <mitov@issp.bas.bg> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/dt3155v4l')
-rw-r--r--drivers/staging/dt3155v4l/dt3155v4l.c7
-rw-r--r--drivers/staging/dt3155v4l/dt3155v4l.h2
2 files changed, 8 insertions, 1 deletions
diff --git a/drivers/staging/dt3155v4l/dt3155v4l.c b/drivers/staging/dt3155v4l/dt3155v4l.c
index b1695ad9b56e..a5e409170418 100644
--- a/drivers/staging/dt3155v4l/dt3155v4l.c
+++ b/drivers/staging/dt3155v4l/dt3155v4l.c
@@ -612,9 +612,14 @@ dt3155_queue_dma_contig_init(struct videobuf_queue *q,
unsigned int msize,
void *priv)
{
+ struct dt3155_priv *pd = q->priv_data;
+
videobuf_queue_dma_contig_init(q, ops, dev, irqlock,
type, field, msize, priv);
- /* overwrite with our methods */
+ /* replace with local copy */
+ pd->qt_ops = *q->int_ops;
+ q->int_ops = &pd->qt_ops;
+ /* and overwrite with our methods */
q->int_ops->iolock = dt3155_iolock;
q->int_ops->mmap_mapper = dt3155_mmap_mapper;
q->int_ops->sync = dt3155_sync_for_cpu;
diff --git a/drivers/staging/dt3155v4l/dt3155v4l.h b/drivers/staging/dt3155v4l/dt3155v4l.h
index e5c4ad05b180..4c6a0ee08c0e 100644
--- a/drivers/staging/dt3155v4l/dt3155v4l.h
+++ b/drivers/staging/dt3155v4l/dt3155v4l.h
@@ -185,6 +185,7 @@ struct dt3155_stats {
* @curr_buf: pointer to curren buffer
* @thread pointer to worker thraed
* @irq_handler: irq handler for the driver
+ * @qt_ops local copy of dma-contig qtype_ops
* @dmaq queue for dma buffers
* @do_dma wait queue of the kernel thread
* @mux: mutex to protect the instance
@@ -204,6 +205,7 @@ struct dt3155_priv {
struct videobuf_buffer *curr_buf;
struct task_struct *thread;
irq_handler_t irq_handler;
+ struct videobuf_qtype_ops qt_ops;
struct list_head dmaq;
wait_queue_head_t do_dma;
struct mutex mux;