]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
device create: scsi: convert device_create to device_create_drvdata
authorGreg Kroah-Hartman <gregkh@suse.de>
Wed, 21 May 2008 19:52:33 +0000 (12:52 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 22 Jul 2008 04:54:44 +0000 (21:54 -0700)
device_create() is race-prone, so use the race-free
device_create_drvdata() instead as device_create() is going away.

Cc: James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/scsi/dpt_i2o.c

index 2bc30e32b67a691823568025e802c52cd3f27a7a..1fe0901e81192d91dad44c4773908c1f6492d39a 100644 (file)
@@ -271,8 +271,8 @@ rebuild_sys_tab:
                pHba->initialized = TRUE;
                pHba->state &= ~DPTI_STATE_RESET;
                if (adpt_sysfs_class) {
-                       struct device *dev = device_create(adpt_sysfs_class,
-                               NULL, MKDEV(DPTI_I2O_MAJOR, pHba->unit),
+                       struct device *dev = device_create_drvdata(adpt_sysfs_class,
+                               NULL, MKDEV(DPTI_I2O_MAJOR, pHba->unit), NULL,
                                "dpti%d", pHba->unit);
                        if (IS_ERR(dev)) {
                                printk(KERN_WARNING"dpti%d: unable to "