mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
device create: dvb: convert device_create to device_create_drvdata
device_create() is race-prone, so use the race-free device_create_drvdata() instead as device_create() is going away. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
275e64decc
commit
e282959ef3
1 changed files with 2 additions and 2 deletions
|
@ -233,9 +233,9 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
|
|||
|
||||
mutex_unlock(&dvbdev_register_lock);
|
||||
|
||||
clsdev = device_create(dvb_class, adap->device,
|
||||
clsdev = device_create_drvdata(dvb_class, adap->device,
|
||||
MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)),
|
||||
"dvb%d.%s%d", adap->num, dnames[type], id);
|
||||
NULL, "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));
|
||||
|
|
Loading…
Reference in a new issue