"NICAM/B\n");
static LIST_HEAD(xc2028_list);
+static DEFINE_MUTEX(xc2028_list_mutex);
+
/* struct for storing firmware table */
struct firmware_description {
unsigned int type;
tuner_dbg("%s called\n", __FUNCTION__);
+ mutex_lock(&xc2028_list_mutex);
+
priv->count--;
if (!priv->count) {
kfree(priv);
}
+ mutex_unlock(&xc2028_list_mutex);
+
return 0;
}
video_dev = cfg->video_dev;
+ mutex_lock(&xc2028_list_mutex);
+
list_for_each_entry(priv, &xc2028_list, xc2028_list) {
if (priv->video_dev == cfg->video_dev) {
video_dev = NULL;
if (video_dev) {
priv = kzalloc(sizeof(*priv), GFP_KERNEL);
- if (priv == NULL)
+ if (priv == NULL) {
+ mutex_unlock(&xc2028_list_mutex);
return NULL;
+ }
priv->bandwidth = BANDWIDTH_6_MHZ;
priv->need_load_generic = 1;
tuner_info("type set to %s\n", "XCeive xc2028/xc3028 tuner");
+ mutex_unlock(&xc2028_list_mutex);
+
return fe;
}