提交 1ff9f542 编写于 作者: G Greg Kroah-Hartman

device create: block: convert device_create_drvdata to device_create

Now that device_create() has been audited, rename things back to the
original call to be sane.
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 ae87221d
......@@ -1024,8 +1024,7 @@ int bsg_register_queue(struct request_queue *q, struct device *parent,
bcd->release = release;
kref_init(&bcd->ref);
dev = MKDEV(bsg_major, bcd->minor);
class_dev = device_create_drvdata(bsg_class, parent, dev, NULL,
"%s", devname);
class_dev = device_create(bsg_class, parent, dev, NULL, "%s", devname);
if (IS_ERR(class_dev)) {
ret = PTR_ERR(class_dev);
goto put_dev;
......
......@@ -284,9 +284,9 @@ aoechr_init(void)
return PTR_ERR(aoe_class);
}
for (i = 0; i < ARRAY_SIZE(chardevs); ++i)
device_create_drvdata(aoe_class, NULL,
MKDEV(AOE_MAJOR, chardevs[i].minor),
NULL, chardevs[i].name);
device_create(aoe_class, NULL,
MKDEV(AOE_MAJOR, chardevs[i].minor), NULL,
chardevs[i].name);
return 0;
}
......
......@@ -686,8 +686,7 @@ static int __init pg_init(void)
for (unit = 0; unit < PG_UNITS; unit++) {
struct pg *dev = &devices[unit];
if (dev->present)
device_create_drvdata(pg_class, NULL,
MKDEV(major, unit), NULL,
device_create(pg_class, NULL, MKDEV(major, unit), NULL,
"pg%u", unit);
}
err = 0;
......
......@@ -979,12 +979,10 @@ static int __init pt_init(void)
for (unit = 0; unit < PT_UNITS; unit++)
if (pt[unit].present) {
device_create_drvdata(pt_class, NULL,
MKDEV(major, unit), NULL,
device_create(pt_class, NULL, MKDEV(major, unit), NULL,
"pt%d", unit);
device_create_drvdata(pt_class, NULL,
MKDEV(major, unit + 128), NULL,
"pt%dn", unit);
device_create(pt_class, NULL, MKDEV(major, unit + 128),
NULL, "pt%dn", unit);
}
goto out;
......
......@@ -302,8 +302,7 @@ static struct kobj_type kobj_pkt_type_wqueue = {
static void pkt_sysfs_dev_new(struct pktcdvd_device *pd)
{
if (class_pktcdvd) {
pd->dev = device_create_drvdata(class_pktcdvd, NULL,
pd->pkt_dev, NULL,
pd->dev = device_create(class_pktcdvd, NULL, pd->pkt_dev, NULL,
"%s", pd->name);
if (IS_ERR(pd->dev))
pd->dev = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册