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/pktcdvd.c | |
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/pktcdvd.c')
-rw-r--r-- | drivers/block/pktcdvd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index 45bee918c46..158eed4d516 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c | |||
@@ -303,7 +303,9 @@ static struct kobj_type kobj_pkt_type_wqueue = { | |||
303 | static void pkt_sysfs_dev_new(struct pktcdvd_device *pd) | 303 | static void pkt_sysfs_dev_new(struct pktcdvd_device *pd) |
304 | { | 304 | { |
305 | if (class_pktcdvd) { | 305 | if (class_pktcdvd) { |
306 | pd->dev = device_create(class_pktcdvd, NULL, pd->pkt_dev, "%s", pd->name); | 306 | pd->dev = device_create_drvdata(class_pktcdvd, NULL, |
307 | pd->pkt_dev, NULL, | ||
308 | "%s", pd->name); | ||
307 | if (IS_ERR(pd->dev)) | 309 | if (IS_ERR(pd->dev)) |
308 | pd->dev = NULL; | 310 | pd->dev = NULL; |
309 | } | 311 | } |