[linux-dvb] [patch 2.6.12-rc4-dvb-cvs 7/14] dvb: cleanup in dvb_unregister

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Cleanup in dvb_unregister
- actually it is not a dvb-generic function and it balances av7110_register
  -> let's rename it to av7110_unregister
- add a few local variables.

No functional change.

Signed-off-by: Francois Romieu <romieu@xxxxxxxxxxxxx>

diff -puN drivers/media/dvb/ttpci/av7110.c~dvb-180 drivers/media/dvb/ttpci/av7110.c
--- a/drivers/media/dvb/ttpci/av7110.c~dvb-180	2005-05-20 19:27:54.961016498 +0200
+++ b/drivers/media/dvb/ttpci/av7110.c	2005-05-20 19:27:54.989011893 +0200
@@ -1349,10 +1349,10 @@ static int av7110_register(struct av7110
 }
 
 
-static void dvb_unregister(struct av7110 *av7110)
+static void av7110_unregister(struct av7110 *av7110)
 {
 	struct dvb_demux *dvbdemux = &av7110->demux;
-	struct dvb_demux *dvbdemux1 = &av7110->demux1;
+	struct dmx_demux *dmx = &dvbdemux->dmx;
 
 	dprintk(4, "%p\n", av7110);
 
@@ -1360,20 +1360,22 @@ static void dvb_unregister(struct av7110
 		return;
 
 	if (budgetpatch) {
+		struct dvb_demux *dvbdemux1 = &av7110->demux1;
+
 		dvb_net_release(&av7110->dvb_net1);
 		dvbdemux->dmx.close(&dvbdemux1->dmx);
 		dvb_dmxdev_release(&av7110->dmxdev1);
-		dvb_dmx_release(&av7110->demux1);
+		dvb_dmx_release(dvbdemux1);
 	}
 
 	dvb_net_release(&av7110->dvb_net);
 
-	dvbdemux->dmx.close(&dvbdemux->dmx);
-	dvbdemux->dmx.remove_frontend(&dvbdemux->dmx, &av7110->hw_frontend);
-	dvbdemux->dmx.remove_frontend(&dvbdemux->dmx, &av7110->mem_frontend);
+	dmx->close(dmx);
+	dmx->remove_frontend(dmx, &av7110->hw_frontend);
+	dmx->remove_frontend(dmx, &av7110->mem_frontend);
 
 	dvb_dmxdev_release(&av7110->dmxdev);
-	dvb_dmx_release(&av7110->demux);
+	dvb_dmx_release(dvbdemux);
 
 	if (av7110->fe != NULL)
 		dvb_unregister_frontend(av7110->fe);
@@ -2653,7 +2655,7 @@ out:
 err_av7110_exit_v4l_12:
 	av7110_exit_v4l(av7110);
 err_av7110_unregister_11:
-	dvb_unregister(av7110);
+	av7110_unregister(av7110);
 err_arm_thread_stop_10:
 	av7110_arm_sync(av7110);
 err_stop_arm_9:
@@ -2704,7 +2706,7 @@ static int av7110_detach(struct saa7146_
 	tasklet_kill(&av7110->debi_tasklet);
 	tasklet_kill(&av7110->gpio_tasklet);
 
-	dvb_unregister(av7110);
+	av7110_unregister(av7110);
 
 	SAA7146_IER_DISABLE(saa, MASK_19 | MASK_03);
 	SAA7146_ISR_CLEAR(saa, MASK_19 | MASK_03);

_



[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux