diff options
Diffstat (limited to 'drivers/scsi/sg.c')
-rw-r--r-- | drivers/scsi/sg.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 040f751809ea..c996d98636f3 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c | |||
@@ -287,8 +287,7 @@ sg_open(struct inode *inode, struct file *filp) | |||
287 | if (list_empty(&sdp->sfds)) { /* no existing opens on this device */ | 287 | if (list_empty(&sdp->sfds)) { /* no existing opens on this device */ |
288 | sdp->sgdebug = 0; | 288 | sdp->sgdebug = 0; |
289 | q = sdp->device->request_queue; | 289 | q = sdp->device->request_queue; |
290 | sdp->sg_tablesize = min(queue_max_hw_segments(q), | 290 | sdp->sg_tablesize = queue_max_segments(q); |
291 | queue_max_phys_segments(q)); | ||
292 | } | 291 | } |
293 | if ((sfp = sg_add_sfp(sdp, dev))) | 292 | if ((sfp = sg_add_sfp(sdp, dev))) |
294 | filp->private_data = sfp; | 293 | filp->private_data = sfp; |
@@ -1376,8 +1375,7 @@ static Sg_device *sg_alloc(struct gendisk *disk, struct scsi_device *scsidp) | |||
1376 | sdp->device = scsidp; | 1375 | sdp->device = scsidp; |
1377 | INIT_LIST_HEAD(&sdp->sfds); | 1376 | INIT_LIST_HEAD(&sdp->sfds); |
1378 | init_waitqueue_head(&sdp->o_excl_wait); | 1377 | init_waitqueue_head(&sdp->o_excl_wait); |
1379 | sdp->sg_tablesize = min(queue_max_hw_segments(q), | 1378 | sdp->sg_tablesize = queue_max_segments(q); |
1380 | queue_max_phys_segments(q)); | ||
1381 | sdp->index = k; | 1379 | sdp->index = k; |
1382 | kref_init(&sdp->d_ref); | 1380 | kref_init(&sdp->d_ref); |
1383 | 1381 | ||