diff options
author | Paul Mackerras <paulus@samba.org> | 2007-02-07 14:05:13 +1100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-02-07 14:05:13 +1100 |
commit | 8423200553113cc031caa9b147f6150a8e26545c (patch) | |
tree | 752c93a200c9ba056c7469c96f7e27d02c99291d /drivers/scsi/sd.c | |
parent | f03e64f2ca6ee3d0b7824536b1940497701fe766 (diff) | |
parent | 62d0cfcb27cf755cebdc93ca95dabc83608007cd (diff) | |
download | kernel-crypto-8423200553113cc031caa9b147f6150a8e26545c.tar.gz kernel-crypto-8423200553113cc031caa9b147f6150a8e26545c.tar.xz kernel-crypto-8423200553113cc031caa9b147f6150a8e26545c.zip |
Merge branch 'linux-2.6'
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r-- | drivers/scsi/sd.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 978bfc1e0c6..b781a90d669 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -1647,16 +1647,6 @@ static int sd_probe(struct device *dev) if (error) goto out_put; - class_device_initialize(&sdkp->cdev); - sdkp->cdev.dev = &sdp->sdev_gendev; - sdkp->cdev.class = &sd_disk_class; - strncpy(sdkp->cdev.class_id, sdp->sdev_gendev.bus_id, BUS_ID_SIZE); - - if (class_device_add(&sdkp->cdev)) - goto out_put; - - get_device(&sdp->sdev_gendev); - sdkp->device = sdp; sdkp->driver = &sd_template; sdkp->disk = gd; @@ -1670,6 +1660,16 @@ static int sd_probe(struct device *dev) sdp->timeout = SD_MOD_TIMEOUT; } + class_device_initialize(&sdkp->cdev); + sdkp->cdev.dev = &sdp->sdev_gendev; + sdkp->cdev.class = &sd_disk_class; + strncpy(sdkp->cdev.class_id, sdp->sdev_gendev.bus_id, BUS_ID_SIZE); + + if (class_device_add(&sdkp->cdev)) + goto out_put; + + get_device(&sdp->sdev_gendev); + gd->major = sd_major((index & 0xf0) >> 4); gd->first_minor = ((index & 0xf) << 4) | (index & 0xfff00); gd->minors = 16; |