Skip to content

Commit 1ff9f54

Browse files
committed
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: Greg Kroah-Hartman <gregkh@suse.de>
1 parent ae87221 commit 1ff9f54

5 files changed

Lines changed: 12 additions & 17 deletions

File tree

‎block/bsg.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,8 +1024,7 @@ int bsg_register_queue(struct request_queue *q, struct device *parent,
10241024
bcd->release = release;
10251025
kref_init(&bcd->ref);
10261026
dev = MKDEV(bsg_major, bcd->minor);
1027-
class_dev = device_create_drvdata(bsg_class, parent, dev, NULL,
1028-
"%s", devname);
1027+
class_dev = device_create(bsg_class, parent, dev, NULL, "%s", devname);
10291028
if (IS_ERR(class_dev)) {
10301029
ret = PTR_ERR(class_dev);
10311030
goto put_dev;

‎drivers/block/aoe/aoechr.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,9 @@ aoechr_init(void)
284284
return PTR_ERR(aoe_class);
285285
}
286286
for (i = 0; i < ARRAY_SIZE(chardevs); ++i)
287-
device_create_drvdata(aoe_class, NULL,
288-
MKDEV(AOE_MAJOR, chardevs[i].minor),
289-
NULL, chardevs[i].name);
287+
device_create(aoe_class, NULL,
288+
MKDEV(AOE_MAJOR, chardevs[i].minor), NULL,
289+
chardevs[i].name);
290290

291291
return 0;
292292
}

‎drivers/block/paride/pg.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -686,9 +686,8 @@ static int __init pg_init(void)
686686
for (unit = 0; unit < PG_UNITS; unit++) {
687687
struct pg *dev = &devices[unit];
688688
if (dev->present)
689-
device_create_drvdata(pg_class, NULL,
690-
MKDEV(major, unit), NULL,
691-
"pg%u", unit);
689+
device_create(pg_class, NULL, MKDEV(major, unit), NULL,
690+
"pg%u", unit);
692691
}
693692
err = 0;
694693
goto out;

‎drivers/block/paride/pt.c‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -979,12 +979,10 @@ static int __init pt_init(void)
979979

980980
for (unit = 0; unit < PT_UNITS; unit++)
981981
if (pt[unit].present) {
982-
device_create_drvdata(pt_class, NULL,
983-
MKDEV(major, unit), NULL,
984-
"pt%d", unit);
985-
device_create_drvdata(pt_class, NULL,
986-
MKDEV(major, unit + 128), NULL,
987-
"pt%dn", unit);
982+
device_create(pt_class, NULL, MKDEV(major, unit), NULL,
983+
"pt%d", unit);
984+
device_create(pt_class, NULL, MKDEV(major, unit + 128),
985+
NULL, "pt%dn", unit);
988986
}
989987
goto out;
990988

‎drivers/block/pktcdvd.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,9 +302,8 @@ static struct kobj_type kobj_pkt_type_wqueue = {
302302
static void pkt_sysfs_dev_new(struct pktcdvd_device *pd)
303303
{
304304
if (class_pktcdvd) {
305-
pd->dev = device_create_drvdata(class_pktcdvd, NULL,
306-
pd->pkt_dev, NULL,
307-
"%s", pd->name);
305+
pd->dev = device_create(class_pktcdvd, NULL, pd->pkt_dev, NULL,
306+
"%s", pd->name);
308307
if (IS_ERR(pd->dev))
309308
pd->dev = NULL;
310309
}

0 commit comments

Comments
 (0)