diff options
Diffstat (limited to 'block/scsi_ioctl.c')
-rw-r--r-- | block/scsi_ioctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c index 6e7db2e79f42..c2ac36dfe4f3 100644 --- a/block/scsi_ioctl.c +++ b/block/scsi_ioctl.c | |||
@@ -46,7 +46,7 @@ EXPORT_SYMBOL(scsi_command_size); | |||
46 | 46 | ||
47 | static int sg_get_version(int __user *p) | 47 | static int sg_get_version(int __user *p) |
48 | { | 48 | { |
49 | static int sg_version_num = 30527; | 49 | static const int sg_version_num = 30527; |
50 | return put_user(sg_version_num, p); | 50 | return put_user(sg_version_num, p); |
51 | } | 51 | } |
52 | 52 | ||
@@ -233,7 +233,7 @@ static int sg_io(struct file *file, request_queue_t *q, | |||
233 | if (verify_command(file, cmd)) | 233 | if (verify_command(file, cmd)) |
234 | return -EPERM; | 234 | return -EPERM; |
235 | 235 | ||
236 | if (hdr->dxfer_len > (q->max_sectors << 9)) | 236 | if (hdr->dxfer_len > (q->max_hw_sectors << 9)) |
237 | return -EIO; | 237 | return -EIO; |
238 | 238 | ||
239 | if (hdr->dxfer_len) | 239 | if (hdr->dxfer_len) |