Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124118
b: refs/heads/master
c: a5f4c0c
h: refs/heads/master
v: v3
  • Loading branch information
Kay Sievers authored and Mauro Carvalho Chehab committed Dec 29, 2008
1 parent 8e51d71 commit 141f275
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7b51a70cbf0c9995caf59f7126d251e14a9e0686
refs/heads/master: a5f4c0ce682efa60fa9552514118bb70a7646e28
12 changes: 11 additions & 1 deletion trunk/drivers/media/dvb/dvb-core/dvbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,

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);
if (IS_ERR(clsdev)) {
printk(KERN_ERR "%s: failed to create device dvb%d.%s%d (%ld)\n",
__func__, adap->num, dnames[type], id, PTR_ERR(clsdev));
Expand Down Expand Up @@ -432,6 +432,15 @@ int dvb_usercopy(struct inode *inode, struct file *file,
return err;
}

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;
}

static int __init init_dvbdev(void)
{
int retval;
Expand All @@ -453,6 +462,7 @@ static int __init init_dvbdev(void)
retval = PTR_ERR(dvb_class);
goto error;
}
dvb_class->dev_uevent = dvb_uevent;
return 0;

error:
Expand Down

0 comments on commit 141f275

Please sign in to comment.