From f79f060561d04a38d41e773ade9baafce3c96179 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 21 May 2008 12:52:33 -0700 Subject: device create: block: 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 --- drivers/block/paride/pg.c | 5 +++-- drivers/block/paride/pt.c | 10 ++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) (limited to 'drivers/block/paride') diff --git a/drivers/block/paride/pg.c b/drivers/block/paride/pg.c index 9d92636350e..d731ca42f80 100644 --- a/drivers/block/paride/pg.c +++ b/drivers/block/paride/pg.c @@ -686,8 +686,9 @@ static int __init pg_init(void) for (unit = 0; unit < PG_UNITS; unit++) { struct pg *dev = &devices[unit]; if (dev->present) - device_create(pg_class, NULL, MKDEV(major, unit), - "pg%u", unit); + device_create_drvdata(pg_class, NULL, + MKDEV(major, unit), NULL, + "pg%u", unit); } err = 0; goto out; diff --git a/drivers/block/paride/pt.c b/drivers/block/paride/pt.c index 5c74c3574a5..673b8b2fd33 100644 --- a/drivers/block/paride/pt.c +++ b/drivers/block/paride/pt.c @@ -979,10 +979,12 @@ static int __init pt_init(void) for (unit = 0; unit < PT_UNITS; unit++) if (pt[unit].present) { - device_create(pt_class, NULL, MKDEV(major, unit), - "pt%d", unit); - device_create(pt_class, NULL, MKDEV(major, unit + 128), - "pt%dn", unit); + device_create_drvdata(pt_class, NULL, + MKDEV(major, unit), NULL, + "pt%d", unit); + device_create_drvdata(pt_class, NULL, + MKDEV(major, unit + 128), NULL, + "pt%dn", unit); } goto out; -- cgit v1.2.3