summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/video-buf-dvb.c
diff options
context:
space:
mode:
authorMichael Krufky <devnull@localhost>2005-06-18 04:00:19 +0000
committerMichael Krufky <devnull@localhost>2005-06-18 04:00:19 +0000
commit2feb602917856a8805a8395869c1a9f19e9ffb0a (patch)
tree0f095e33bc7130bcafd8d6445ae844f969599635 /linux/drivers/media/video/video-buf-dvb.c
parent83c92774bba7834e2106aaaf57e4751adc068272 (diff)
downloadmediapointer-dvb-s2-2feb602917856a8805a8395869c1a9f19e9ffb0a.tar.gz
mediapointer-dvb-s2-2feb602917856a8805a8395869c1a9f19e9ffb0a.tar.bz2
Allow backwards compatability with kernels < 2.6.12; add $id to tuner.h
Diffstat (limited to 'linux/drivers/media/video/video-buf-dvb.c')
-rw-r--r--linux/drivers/media/video/video-buf-dvb.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/linux/drivers/media/video/video-buf-dvb.c b/linux/drivers/media/video/video-buf-dvb.c
index cd48516a9..16a4560d1 100644
--- a/linux/drivers/media/video/video-buf-dvb.c
+++ b/linux/drivers/media/video/video-buf-dvb.c
@@ -1,5 +1,5 @@
/*
- * $Id: video-buf-dvb.c,v 1.8 2005/06/14 22:53:55 hhackmann Exp $
+ * $Id: video-buf-dvb.c,v 1.9 2005/06/18 04:00:19 mkrufky Exp $
*
* some helper function for simple DVB cards which simply DMA the
* complete transport stream and let the computer sort everything else
@@ -149,10 +149,16 @@ int videobuf_dvb_register(struct videobuf_dvb *dvb,
dvb->name, result);
goto fail_adapter;
}
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12))
dvb->adapter.priv = adapter_priv;
-
/* register frontend */
result = dvb_register_frontend(&dvb->adapter, dvb->frontend);
+#else
+ dvb->adapter->priv = adapter_priv;
+ /* register frontend */
+ result = dvb_register_frontend(dvb->adapter, dvb->frontend);
+#endif
+
if (result < 0) {
printk(KERN_WARNING "%s: dvb_register_frontend failed (errno = %d)\n",
dvb->name, result);
@@ -178,7 +184,11 @@ int videobuf_dvb_register(struct videobuf_dvb *dvb,
dvb->dmxdev.filternum = 256;
dvb->dmxdev.demux = &dvb->demux.dmx;
dvb->dmxdev.capabilities = 0;
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12))
result = dvb_dmxdev_init(&dvb->dmxdev, &dvb->adapter);
+#else
+ result = dvb_dmxdev_init(&dvb->dmxdev, dvb->adapter);
+#endif
if (result < 0) {
printk(KERN_WARNING "%s: dvb_dmxdev_init failed (errno = %d)\n",
dvb->name, result);
@@ -209,7 +219,11 @@ int videobuf_dvb_register(struct videobuf_dvb *dvb,
}
/* register network adapter */
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12))
dvb_net_init(&dvb->adapter, &dvb->net, &dvb->demux.dmx);
+#else
+ dvb_net_init(dvb->adapter, &dvb->net, &dvb->demux.dmx);
+#endif
return 0;
fail_fe_conn:
@@ -223,7 +237,11 @@ fail_dmxdev:
fail_dmx:
dvb_unregister_frontend(dvb->frontend);
fail_frontend:
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12))
dvb_unregister_adapter(&dvb->adapter);
+#else
+ dvb_unregister_adapter(dvb->adapter);
+#endif
fail_adapter:
return result;
}
@@ -236,7 +254,11 @@ void videobuf_dvb_unregister(struct videobuf_dvb *dvb)
dvb_dmxdev_release(&dvb->dmxdev);
dvb_dmx_release(&dvb->demux);
dvb_unregister_frontend(dvb->frontend);
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12))
dvb_unregister_adapter(&dvb->adapter);
+#else
+ dvb_unregister_adapter(dvb->adapter);
+#endif
}
EXPORT_SYMBOL(videobuf_dvb_register);