diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2008-05-21 21:52:33 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-07-22 06:54:41 +0200 |
commit | f79f060561d04a38d41e773ade9baafce3c96179 (patch) | |
tree | 42c8510983db05ba8a68626732940cfa73d6b60f /drivers/block/paride/pt.c | |
parent | Firmware: fix typo in example code (diff) | |
download | linux-f79f060561d04a38d41e773ade9baafce3c96179.tar.xz linux-f79f060561d04a38d41e773ade9baafce3c96179.zip |
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/pt.c')
-rw-r--r-- | drivers/block/paride/pt.c | 10 |
1 files changed, 6 insertions, 4 deletions
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) 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; |