diff options
Diffstat (limited to 'linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c')
-rw-r--r-- | linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c b/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c index ad1ef4ca0..0183dc607 100644 --- a/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c +++ b/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c @@ -780,9 +780,15 @@ static int __init dvb_bt8xx_load_card(struct dvb_bt8xx_card *card, u32 type) return 0; } +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) static int dvb_bt8xx_probe(struct device *dev) +#else +static int dvb_bt8xx_probe(struct bttv_sub_device *sub) +#endif { +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) struct bttv_sub_device *sub = to_bttv_sub_dev(dev); +#endif struct dvb_bt8xx_card *card; struct pci_dev* bttv_pci_dev; int ret; @@ -891,13 +897,25 @@ static int dvb_bt8xx_probe(struct device *dev) return ret; } +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) dev_set_drvdata(dev, card); +#else + dev_set_drvdata(&sub->dev, card); +#endif return 0; } +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) static int dvb_bt8xx_remove(struct device *dev) +#else +static int dvb_bt8xx_remove(struct bttv_sub_device *sub) +#endif { +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) struct dvb_bt8xx_card *card = dev_get_drvdata(dev); +#else + struct dvb_bt8xx_card *card = dev_get_drvdata(&sub->dev); +#endif dprintk("dvb_bt8xx: unloading card%d\n", card->bttv_nr); @@ -920,6 +938,7 @@ static int dvb_bt8xx_remove(struct device *dev) static struct bttv_sub_driver driver = { .drv = { .name = "dvb-bt8xx", +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) .probe = dvb_bt8xx_probe, .remove = dvb_bt8xx_remove, /* FIXME: @@ -927,7 +946,17 @@ static struct bttv_sub_driver driver = { * .suspend = dvb_bt8xx_suspend, * .resume = dvb_bt8xx_resume, */ +#endif }, +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) + .probe = dvb_bt8xx_probe, + .remove = dvb_bt8xx_remove, + /* FIXME: + * .shutdown = dvb_bt8xx_shutdown, + * .suspend = dvb_bt8xx_suspend, + * .resume = dvb_bt8xx_resume, + */ +#endif }; static int __init dvb_bt8xx_init(void) |