diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2008-10-30 08:44:52 +0100 |
---|---|---|
committer | Jean-Francois Moine <moinejf@free.fr> | 2008-10-30 08:44:52 +0100 |
commit | 27d6e2744757effc89be0cd41f441274b1ed9298 (patch) | |
tree | 6ef3d5d591d070a91fc8ad73eda859e52a2436e8 | |
parent | 8e5aae01ca4ac971cf93f27ebbd0d87a578ae107 (diff) | |
parent | 3406a0aa7630cd74e82a090e2c2c9b2f00152481 (diff) | |
download | mediapointer-dvb-s2-27d6e2744757effc89be0cd41f441274b1ed9298.tar.gz mediapointer-dvb-s2-27d6e2744757effc89be0cd41f441274b1ed9298.tar.bz2 |
merge: v4l-dvb
-rw-r--r-- | linux/drivers/media/dvb/dm1105/dm1105.c | 6 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvbdev.c | 18 |
2 files changed, 17 insertions, 7 deletions
diff --git a/linux/drivers/media/dvb/dm1105/dm1105.c b/linux/drivers/media/dvb/dm1105/dm1105.c index 19daa752f..f578cbdb6 100644 --- a/linux/drivers/media/dvb/dm1105/dm1105.c +++ b/linux/drivers/media/dvb/dm1105/dm1105.c @@ -367,11 +367,7 @@ static int __devinit dm1105dvb_dma_map(struct dm1105dvb *dm1105dvb) { dm1105dvb->ts_buf = pci_alloc_consistent(dm1105dvb->pdev, 6*DM1105_DMA_BYTES, &dm1105dvb->dma_addr); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 27) - return pci_dma_mapping_error(dm1105dvb->dma_addr); -#else - return pci_dma_mapping_error(dm1105dvb->pdev, dm1105dvb->dma_addr); -#endif + return !dm1105dvb->ts_buf; } static void dm1105dvb_dma_unmap(struct dm1105dvb *dm1105dvb) diff --git a/linux/drivers/media/dvb/dvb-core/dvbdev.c b/linux/drivers/media/dvb/dvb-core/dvbdev.c index a35286f1a..59a65a8c3 100644 --- a/linux/drivers/media/dvb/dvb-core/dvbdev.c +++ b/linux/drivers/media/dvb/dvb-core/dvbdev.c @@ -262,11 +262,11 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev, #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 27) clsdev = device_create(dvb_class, adap->device, MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)), - NULL, "dvb%d.%s%d", adap->num, dnames[type], id); + dvbdev, "dvb%d.%s%d", adap->num, dnames[type], id); #elif LINUX_VERSION_CODE == KERNEL_VERSION(2, 6, 27) clsdev = device_create_drvdata(dvb_class, adap->device, MKDEV(DVB_MAJOR, minor), - NULL, "dvb%d.%s%d", adap->num, dnames[type], id); + dvbdev, "dvb%d.%s%d", adap->num, dnames[type], id); #else clsdev = device_create(dvb_class, adap->device, MKDEV(DVB_MAJOR, minor), @@ -451,6 +451,17 @@ out: return err; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27) +static int dvb_uevent(struct device *dev, struct kobj_uevent_env *env) +{ + struct dvb_device *dvbdev = dev_get_drvdata(dev); + + add_uevent_var(env, "DVB_DEVICE_NUM=%d", dvbdev->id); + add_uevent_var(env, "DVB_ADAPTER_NUM=%d", dvbdev->adapter->num); + return 0; +} +#endif + static int __init init_dvbdev(void) { int retval; @@ -477,6 +488,9 @@ static int __init init_dvbdev(void) retval = PTR_ERR(dvb_class); goto error; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27) + dvb_class->dev_uevent = dvb_uevent; +#endif return 0; error: |