| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | cx231xx-core.c - driver for Conexant Cx23100/101/102 |
|---|
| 3 | 4 | USB video capture devices |
|---|
| .. | .. |
|---|
| 5 | 6 | Copyright (C) 2008 <srinivasa.deevi at conexant dot com> |
|---|
| 6 | 7 | Based on em28xx driver |
|---|
| 7 | 8 | |
|---|
| 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. |
|---|
| 21 | 9 | */ |
|---|
| 22 | 10 | |
|---|
| 23 | 11 | #include "cx231xx.h" |
|---|
| .. | .. |
|---|
| 65 | 53 | /* |
|---|
| 66 | 54 | * cx231xx_realease_resources() |
|---|
| 67 | 55 | * 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 |
|---|
| 69 | 57 | */ |
|---|
| 70 | 58 | void cx231xx_remove_from_devlist(struct cx231xx *dev) |
|---|
| 71 | 59 | { |
|---|
| .. | .. |
|---|
| 127 | 115 | struct cx231xx_ops *ops = NULL; |
|---|
| 128 | 116 | |
|---|
| 129 | 117 | 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); |
|---|
| 135 | 121 | } |
|---|
| 136 | 122 | mutex_unlock(&cx231xx_devlist_mutex); |
|---|
| 137 | 123 | } |
|---|
| .. | .. |
|---|
| 141 | 127 | struct cx231xx_ops *ops = NULL; |
|---|
| 142 | 128 | |
|---|
| 143 | 129 | 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); |
|---|
| 149 | 133 | } |
|---|
| 150 | 134 | mutex_unlock(&cx231xx_devlist_mutex); |
|---|
| 151 | 135 | } |
|---|