提交 0fd15a18 编写于 作者: G Greg Kroah-Hartman

device create: hid: 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: NJiri Kosina <jkosina@suse.cz>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 1e274401
......@@ -322,7 +322,8 @@ int hidraw_connect(struct hid_device *hid)
goto out;
}
dev->dev = device_create(hidraw_class, NULL, MKDEV(hidraw_major, minor),
dev->dev = device_create_drvdata(hidraw_class, NULL,
MKDEV(hidraw_major, minor), NULL,
"%s%d", "hidraw", minor);
if (IS_ERR(dev->dev)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册