patch-2.4.3 linux/drivers/media/video/bttv-driver.c

Next file: linux/drivers/media/video/bttv.h
Previous file: linux/drivers/media/radio/radio-zoltrix.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.2/linux/drivers/media/video/bttv-driver.c linux/drivers/media/video/bttv-driver.c
@@ -1352,7 +1352,6 @@
 	if (bttv_debug)
 		printk("bttv%d: open called\n",btv->nr);
 
-	MOD_INC_USE_COUNT;
 	down(&btv->lock);
 	if (btv->user)
 		goto out_unlock;
@@ -1378,7 +1377,6 @@
 
  out_unlock:
 	up(&btv->lock);
-	MOD_DEC_USE_COUNT;
 	return ret;
 }
 
@@ -1423,7 +1421,6 @@
 		rvfree((void *) btv->fbuffer, gbuffers*gbufsize);
 	btv->fbuffer=0;
 	up(&btv->lock);
-	MOD_DEC_USE_COUNT;  
 }
 
 
@@ -2053,6 +2050,7 @@
 
 static struct video_device bttv_template=
 {
+	owner:		THIS_MODULE,
 	name:		"UNSET",
 	type:		VID_TYPE_TUNER|VID_TYPE_CAPTURE|VID_TYPE_OVERLAY|VID_TYPE_TELETEXT,
 	hardware:	VID_HARDWARE_BT848,
@@ -2140,7 +2138,6 @@
 	struct bttv *btv=(struct bttv *)(dev-2);
  	unsigned long irq_flags;
 
-	MOD_INC_USE_COUNT;
         down(&btv->lock);
 	if (btv->needs_restart)
 		bt848_restart(btv);
@@ -2164,7 +2161,6 @@
 	btv->vbi_on = 0;
 	bt848_set_risc_jmps(btv,-1);
 	spin_unlock_irqrestore(&btv->s_lock, irq_flags);
-	MOD_DEC_USE_COUNT;  
 }
 
 static int vbi_ioctl(struct video_device *dev, unsigned int cmd, void *arg)
@@ -2202,6 +2198,7 @@
 
 static struct video_device vbi_template=
 {
+	owner:		THIS_MODULE,
 	name:		"bttv vbi",
 	type:		VID_TYPE_CAPTURE|VID_TYPE_TELETEXT,
 	hardware:	VID_HARDWARE_BT848,
@@ -2220,7 +2217,6 @@
 	struct bttv *btv = (struct bttv *)(dev-1);
 	unsigned long v;
 
-	MOD_INC_USE_COUNT;
         down(&btv->lock);
 	if (btv->user)
 		goto busy_unlock;
@@ -2237,7 +2233,6 @@
 
  busy_unlock:
 	up(&btv->lock);
-	MOD_DEC_USE_COUNT;
 	return -EBUSY;
 }
 
@@ -2249,7 +2244,6 @@
 	btv->user--;
 	btv->radio = 0;
 	up(&btv->lock);
-	MOD_DEC_USE_COUNT;  
 }
 
 static long radio_read(struct video_device *v, char *buf, unsigned long count, int nonblock)
@@ -2320,6 +2314,7 @@
 
 static struct video_device radio_template=
 {
+	owner:		THIS_MODULE,
 	name:		"bttv radio",
 	type:		VID_TYPE_TUNER,
 	hardware:	VID_HARDWARE_BT848,

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)