summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/dvb-core/dvbdev.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-09-13 11:53:31 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-09-13 11:53:31 -0300
commit4c691e7dabc47811013c7266fa5f32fe96687c36 (patch)
treea6185d7724be9b53607ab988625fd75052b1a9b2 /linux/drivers/media/dvb/dvb-core/dvbdev.c
parent8201f56625ffdc9146ad8eb4525c1b50e6194f5a (diff)
parent4198bf24c30e208e3c1a4d833e52ee2330bdb008 (diff)
downloadmediapointer-dvb-s2-4c691e7dabc47811013c7266fa5f32fe96687c36.tar.gz
mediapointer-dvb-s2-4c691e7dabc47811013c7266fa5f32fe96687c36.tar.bz2
merge: http://kernellabs.com/hg/~dheitmueller/em28xx-vbi3
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/dvb/dvb-core/dvbdev.c')
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvbdev.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvbdev.c b/linux/drivers/media/dvb/dvb-core/dvbdev.c
index f6084e19d..2028be23d 100644
--- a/linux/drivers/media/dvb/dvb-core/dvbdev.c
+++ b/linux/drivers/media/dvb/dvb-core/dvbdev.c
@@ -472,6 +472,17 @@ static int dvb_uevent(struct device *dev, struct kobj_uevent_env *env)
}
#endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)
+static char *dvb_nodename(struct device *dev)
+{
+ struct dvb_device *dvbdev = dev_get_drvdata(dev);
+
+ return kasprintf(GFP_KERNEL, "dvb/adapter%d/%s%d",
+ dvbdev->adapter->num, dnames[dvbdev->type], dvbdev->id);
+}
+
+
+#endif
static int __init init_dvbdev(void)
{
int retval;
@@ -501,6 +512,9 @@ static int __init init_dvbdev(void)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
dvb_class->dev_uevent = dvb_uevent;
#endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)
+ dvb_class->nodename = dvb_nodename;
+#endif
return 0;
error: