diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2008-05-21 15:52:33 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-07-22 00:54:41 -0400 |
commit | f79f060561d04a38d41e773ade9baafce3c96179 (patch) | |
tree | 42c8510983db05ba8a68626732940cfa73d6b60f /drivers/block/paride | |
parent | 09857e35cdccf2457bb03c6d7595adc210a517cc (diff) |
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 <gregkh@suse.de>
Diffstat (limited to 'drivers/block/paride')
-rw-r--r-- | drivers/block/paride/pg.c | 5 | ||||
-rw-r--r-- | drivers/block/paride/pt.c | 10 |
2 files changed, 9 insertions, 6 deletions
diff --git a/drivers/block/paride/pg.c b/drivers/block/paride/pg.c index 9d92636350e5..d731ca42f802 100644 --- a/drivers/block/paride/pg.c +++ b/drivers/block/paride/pg.c | |||
@@ -686,8 +686,9 @@ static int __init pg_init(void) | |||
686 | for (unit = 0; unit < PG_UNITS; unit++) { | 686 | for (unit = 0; unit < PG_UNITS; unit++) { |
687 | struct pg *dev = &devices[unit]; | 687 | struct pg *dev = &devices[unit]; |
688 | if (dev->present) | 688 | if (dev->present) |
689 | device_create(pg_class, NULL, MKDEV(major, unit), | 689 | device_create_drvdata(pg_class, NULL, |
690 | "pg%u", unit); | 690 | MKDEV(major, unit), NULL, |
691 | "pg%u", unit); | ||
691 | } | 692 | } |
692 | err = 0; | 693 | err = 0; |
693 | goto out; | 694 | goto out; |
diff --git a/drivers/block/paride/pt.c b/drivers/block/paride/pt.c index 5c74c3574a5a..673b8b2fd337 100644 --- a/drivers/block/paride/pt.c +++ b/drivers/block/paride/pt.c | |||
@@ -979,10 +979,12 @@ static int __init pt_init(void) | |||
979 | 979 | ||
980 | for (unit = 0; unit < PT_UNITS; unit++) | 980 | for (unit = 0; unit < PT_UNITS; unit++) |
981 | if (pt[unit].present) { | 981 | if (pt[unit].present) { |
982 | device_create(pt_class, NULL, MKDEV(major, unit), | 982 | device_create_drvdata(pt_class, NULL, |
983 | "pt%d", unit); | 983 | MKDEV(major, unit), NULL, |
984 | device_create(pt_class, NULL, MKDEV(major, unit + 128), | 984 | "pt%d", unit); |
985 | "pt%dn", unit); | 985 | device_create_drvdata(pt_class, NULL, |
986 | MKDEV(major, unit + 128), NULL, | ||
987 | "pt%dn", unit); | ||
986 | } | 988 | } |
987 | goto out; | 989 | goto out; |
988 | 990 | ||