aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/video/cx231xx/cx231xx-core.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/media/video/cx231xx/cx231xx-core.c b/drivers/media/video/cx231xx/cx231xx-core.c
index b24eee115e7e..f5e1a2315fcc 100644
--- a/drivers/media/video/cx231xx/cx231xx-core.c
+++ b/drivers/media/video/cx231xx/cx231xx-core.c
@@ -96,10 +96,9 @@ int cx231xx_register_extension(struct cx231xx_ops *ops)
96 mutex_lock(&cx231xx_devlist_mutex); 96 mutex_lock(&cx231xx_devlist_mutex);
97 mutex_lock(&cx231xx_extension_devlist_lock); 97 mutex_lock(&cx231xx_extension_devlist_lock);
98 list_add_tail(&ops->next, &cx231xx_extension_devlist); 98 list_add_tail(&ops->next, &cx231xx_extension_devlist);
99 list_for_each_entry(dev, &cx231xx_devlist, devlist) { 99 list_for_each_entry(dev, &cx231xx_devlist, devlist)
100 if (dev) 100 ops->init(dev);
101 ops->init(dev); 101
102 }
103 printk(KERN_INFO DRIVER_NAME ": %s initialized\n", ops->name); 102 printk(KERN_INFO DRIVER_NAME ": %s initialized\n", ops->name);
104 mutex_unlock(&cx231xx_extension_devlist_lock); 103 mutex_unlock(&cx231xx_extension_devlist_lock);
105 mutex_unlock(&cx231xx_devlist_mutex); 104 mutex_unlock(&cx231xx_devlist_mutex);
@@ -112,10 +111,8 @@ void cx231xx_unregister_extension(struct cx231xx_ops *ops)
112 struct cx231xx *dev = NULL; 111 struct cx231xx *dev = NULL;
113 112
114 mutex_lock(&cx231xx_devlist_mutex); 113 mutex_lock(&cx231xx_devlist_mutex);
115 list_for_each_entry(dev, &cx231xx_devlist, devlist) { 114 list_for_each_entry(dev, &cx231xx_devlist, devlist)
116 if (dev) 115 ops->fini(dev);
117 ops->fini(dev);
118 }
119 116
120 mutex_lock(&cx231xx_extension_devlist_lock); 117 mutex_lock(&cx231xx_extension_devlist_lock);
121 printk(KERN_INFO DRIVER_NAME ": %s removed\n", ops->name); 118 printk(KERN_INFO DRIVER_NAME ": %s removed\n", ops->name);