Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 46065
b: refs/heads/master
c: 017f2e3
h: refs/heads/master
i:
  46063: 5bbf703
v: v3
  • Loading branch information
Nagendra Singh Tomar authored and James Bottomley committed Feb 3, 2007
1 parent 5b45fef commit dad92ac
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 91614c054c9ffc26b47a5cb3135113aa0f6e6ff0
refs/heads/master: 017f2e37ae19ccd28e5edd965741fc374194c5dd
20 changes: 10 additions & 10 deletions trunk/drivers/scsi/sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit dad92ac

Please sign in to comment.