summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
authorSteven Toth <stoth@hauppauge.com>2006-09-29 23:24:30 -0400
committerSteven Toth <stoth@hauppauge.com>2006-09-29 23:24:30 -0400
commitd1e328dd3ef78ea95c5e43fb58b19bbafe7dcee1 (patch)
tree0ffdb7a04d66a79698932c34022f7e0932449158 /linux/drivers/media/video
parent3cb96f769778203f2a971250d765bbeb0e493c74 (diff)
downloadmediapointer-dvb-s2-d1e328dd3ef78ea95c5e43fb58b19bbafe7dcee1.tar.gz
mediapointer-dvb-s2-d1e328dd3ef78ea95c5e43fb58b19bbafe7dcee1.tar.bz2
Remove the cx8802_dev driver lock and use the core mutex
From: Steven Toth <stoth@hauppauge.com> The cx8802_dev semaphore was unnecessary. This patch removes is and uses the existing core mutex. Signed-off-by: Steven Toth <stoth@hauppauge.com>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/cx88/cx88-mpeg.c10
-rw-r--r--linux/drivers/media/video/cx88/cx88.h1
2 files changed, 4 insertions, 7 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-mpeg.c b/linux/drivers/media/video/cx88/cx88-mpeg.c
index b5ef885ac..e36a9dccf 100644
--- a/linux/drivers/media/video/cx88/cx88-mpeg.c
+++ b/linux/drivers/media/video/cx88/cx88-mpeg.c
@@ -471,8 +471,6 @@ int cx8802_init_common(struct cx8802_dev *dev)
#endif
spin_lock_init(&dev->slock);
- init_MUTEX(&dev->drvlist_lock);
-
/* init dma queue */
INIT_LIST_HEAD(&dev->mpegq.active);
INIT_LIST_HEAD(&dev->mpegq.queued);
@@ -726,9 +724,9 @@ int cx8802_register_driver(struct cx8802_driver *drv)
err = drv->probe(driver);
if (err == 0) {
- down(&h->drvlist_lock);
+ mutex_lock(&drv->core->lock);
list_add_tail(&driver->devlist,&h->drvlist.devlist);
- up(&h->drvlist_lock);
+ mutex_unlock(&drv->core->lock);
} else {
printk(KERN_ERR "%s() ->probe failed err = %d\n", __FUNCTION__, err);
}
@@ -769,9 +767,9 @@ int cx8802_unregister_driver(struct cx8802_driver *drv)
err = d->remove(d);
if (err == 0) {
- down(&h->drvlist_lock);
+ mutex_lock(&drv->core->lock);
list_del(list2);
- up(&h->drvlist_lock);
+ mutex_unlock(&drv->core->lock);
} else
printk(KERN_ERR "%s() ->remove failed err = %d\n", __FUNCTION__, err);
diff --git a/linux/drivers/media/video/cx88/cx88.h b/linux/drivers/media/video/cx88/cx88.h
index f77d45426..436847b70 100644
--- a/linux/drivers/media/video/cx88/cx88.h
+++ b/linux/drivers/media/video/cx88/cx88.h
@@ -514,7 +514,6 @@ struct cx8802_dev {
struct cx2341x_mpeg_params params;
/* List of attached drivers */
- struct semaphore drvlist_lock;
struct cx8802_driver drvlist;
};