forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/drivers/media/usb/cx231xx/cx231xx-core.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 cx231xx-core.c - driver for Conexant Cx23100/101/102
34 USB video capture devices
....@@ -5,19 +6,6 @@
56 Copyright (C) 2008 <srinivasa.deevi at conexant dot com>
67 Based on em28xx driver
78
8
- This program is free software; you can redistribute it and/or modify
9
- it under the terms of the GNU General Public License as published by
10
- the Free Software Foundation; either version 2 of the License, or
11
- (at your option) any later version.
12
-
13
- This program is distributed in the hope that it will be useful,
14
- but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
- GNU General Public License for more details.
17
-
18
- You should have received a copy of the GNU General Public License
19
- along with this program; if not, write to the Free Software
20
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
219 */
2210
2311 #include "cx231xx.h"
....@@ -65,7 +53,7 @@
6553 /*
6654 * cx231xx_realease_resources()
6755 * unregisters the v4l2,i2c and usb devices
68
- * called when the device gets disconected or at module unload
56
+ * called when the device gets disconnected or at module unload
6957 */
7058 void cx231xx_remove_from_devlist(struct cx231xx *dev)
7159 {
....@@ -127,11 +115,9 @@
127115 struct cx231xx_ops *ops = NULL;
128116
129117 mutex_lock(&cx231xx_devlist_mutex);
130
- if (!list_empty(&cx231xx_extension_devlist)) {
131
- list_for_each_entry(ops, &cx231xx_extension_devlist, next) {
132
- if (ops->init)
133
- ops->init(dev);
134
- }
118
+ list_for_each_entry(ops, &cx231xx_extension_devlist, next) {
119
+ if (ops->init)
120
+ ops->init(dev);
135121 }
136122 mutex_unlock(&cx231xx_devlist_mutex);
137123 }
....@@ -141,11 +127,9 @@
141127 struct cx231xx_ops *ops = NULL;
142128
143129 mutex_lock(&cx231xx_devlist_mutex);
144
- if (!list_empty(&cx231xx_extension_devlist)) {
145
- list_for_each_entry(ops, &cx231xx_extension_devlist, next) {
146
- if (ops->fini)
147
- ops->fini(dev);
148
- }
130
+ list_for_each_entry(ops, &cx231xx_extension_devlist, next) {
131
+ if (ops->fini)
132
+ ops->fini(dev);
149133 }
150134 mutex_unlock(&cx231xx_devlist_mutex);
151135 }