diff options
Diffstat (limited to 'drivers/block/paride/pd.c')
-rw-r--r-- | drivers/block/paride/pd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c index 0732df4e901a..9ec5d4ac0b64 100644 --- a/drivers/block/paride/pd.c +++ b/drivers/block/paride/pd.c | |||
@@ -444,11 +444,11 @@ static enum action do_pd_io_start(void) | |||
444 | 444 | ||
445 | pd_cmd = rq_data_dir(pd_req); | 445 | pd_cmd = rq_data_dir(pd_req); |
446 | if (pd_cmd == READ || pd_cmd == WRITE) { | 446 | if (pd_cmd == READ || pd_cmd == WRITE) { |
447 | pd_block = pd_req->sector; | 447 | pd_block = blk_rq_pos(pd_req); |
448 | pd_count = pd_req->current_nr_sectors; | 448 | pd_count = blk_rq_cur_sectors(pd_req); |
449 | if (pd_block + pd_count > get_capacity(pd_req->rq_disk)) | 449 | if (pd_block + pd_count > get_capacity(pd_req->rq_disk)) |
450 | return Fail; | 450 | return Fail; |
451 | pd_run = pd_req->nr_sectors; | 451 | pd_run = blk_rq_sectors(pd_req); |
452 | pd_buf = pd_req->buffer; | 452 | pd_buf = pd_req->buffer; |
453 | pd_retries = 0; | 453 | pd_retries = 0; |
454 | if (pd_cmd == READ) | 454 | if (pd_cmd == READ) |
@@ -479,7 +479,7 @@ static int pd_next_buf(void) | |||
479 | return 0; | 479 | return 0; |
480 | spin_lock_irqsave(&pd_lock, saved_flags); | 480 | spin_lock_irqsave(&pd_lock, saved_flags); |
481 | __blk_end_request_cur(pd_req, 0); | 481 | __blk_end_request_cur(pd_req, 0); |
482 | pd_count = pd_req->current_nr_sectors; | 482 | pd_count = blk_rq_cur_sectors(pd_req); |
483 | pd_buf = pd_req->buffer; | 483 | pd_buf = pd_req->buffer; |
484 | spin_unlock_irqrestore(&pd_lock, saved_flags); | 484 | spin_unlock_irqrestore(&pd_lock, saved_flags); |
485 | return 0; | 485 | return 0; |