aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/ataflop.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-04-22 22:05:19 -0400
committerJens Axboe <jens.axboe@oracle.com>2009-04-28 01:37:36 -0400
commitf06d9a2b52e246a66b606130cea3f0d7b7be17a7 (patch)
tree020df1f9d54b00c72d8af02ac0827d496597e75a /drivers/block/ataflop.c
parent40cbbb781d3eba5d6ac0860db078af490e5c7c6b (diff)
block: replace end_request() with [__]blk_end_request_cur()
end_request() has been kept around for backward compatibility; however, it's about time for it to go away. * There aren't too many users left. * Its use of @updtodate is pretty confusing. * In some cases, newer code ends up using mixture of end_request() and [__]blk_end_request[_all](), which is way too confusing. So, add [__]blk_end_request_cur() and replace end_request() with it. Most conversions are straightforward. Noteworthy ones are... * paride/pcd: next_request() updated to take 0/-errno instead of 1/0. * paride/pf: pf_end_request() and next_request() updated to take 0/-errno instead of 1/0. * xd: xd_readwrite() updated to return 0/-errno instead of 1/0. * mtd/mtd_blkdevs: blktrans_discard_request() updated to return 0/-errno instead of 1/0. Unnecessary local variable res initialization removed from mtd_blktrans_thread(). [ Impact: cleanup ] Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Joerg Dorchain <joerg@dorchain.net> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Laurent Vivier <Laurent@lvivier.info> Cc: Tim Waugh <tim@cyberelk.net> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Paul Mackerras <paulus@samba.org> Cc: Jeremy Fitzhardinge <jeremy@xensource.com> Cc: Markus Lidel <Markus.Lidel@shadowconnect.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Pete Zaitcev <zaitcev@redhat.com> Cc: unsik Kim <donari75@gmail.com>
Diffstat (limited to 'drivers/block/ataflop.c')
-rw-r--r--drivers/block/ataflop.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/block/ataflop.c b/drivers/block/ataflop.c
index 4234c11c1e4c..44a8702136a9 100644
--- a/drivers/block/ataflop.c
+++ b/drivers/block/ataflop.c
@@ -612,7 +612,7 @@ static void fd_error( void )
612 CURRENT->errors++; 612 CURRENT->errors++;
613 if (CURRENT->errors >= MAX_ERRORS) { 613 if (CURRENT->errors >= MAX_ERRORS) {
614 printk(KERN_ERR "fd%d: too many errors.\n", SelectedDrive ); 614 printk(KERN_ERR "fd%d: too many errors.\n", SelectedDrive );
615 end_request(CURRENT, 0); 615 __blk_end_request_cur(CURRENT, -EIO);
616 } 616 }
617 else if (CURRENT->errors == RECALIBRATE_ERRORS) { 617 else if (CURRENT->errors == RECALIBRATE_ERRORS) {
618 printk(KERN_WARNING "fd%d: recalibrating\n", SelectedDrive ); 618 printk(KERN_WARNING "fd%d: recalibrating\n", SelectedDrive );
@@ -734,7 +734,7 @@ static void do_fd_action( int drive )
734 /* all sectors finished */ 734 /* all sectors finished */
735 CURRENT->nr_sectors -= CURRENT->current_nr_sectors; 735 CURRENT->nr_sectors -= CURRENT->current_nr_sectors;
736 CURRENT->sector += CURRENT->current_nr_sectors; 736 CURRENT->sector += CURRENT->current_nr_sectors;
737 end_request(CURRENT, 1); 737 __blk_end_request_cur(CURRENT, 0);
738 redo_fd_request(); 738 redo_fd_request();
739 return; 739 return;
740 } 740 }
@@ -1141,7 +1141,7 @@ static void fd_rwsec_done1(int status)
1141 /* all sectors finished */ 1141 /* all sectors finished */
1142 CURRENT->nr_sectors -= CURRENT->current_nr_sectors; 1142 CURRENT->nr_sectors -= CURRENT->current_nr_sectors;
1143 CURRENT->sector += CURRENT->current_nr_sectors; 1143 CURRENT->sector += CURRENT->current_nr_sectors;
1144 end_request(CURRENT, 1); 1144 __blk_end_request_cur(CURRENT, 0);
1145 redo_fd_request(); 1145 redo_fd_request();
1146 } 1146 }
1147 return; 1147 return;
@@ -1414,7 +1414,7 @@ repeat:
1414 if (!UD.connected) { 1414 if (!UD.connected) {
1415 /* drive not connected */ 1415 /* drive not connected */
1416 printk(KERN_ERR "Unknown Device: fd%d\n", drive ); 1416 printk(KERN_ERR "Unknown Device: fd%d\n", drive );
1417 end_request(CURRENT, 0); 1417 __blk_end_request_cur(CURRENT, -EIO);
1418 goto repeat; 1418 goto repeat;
1419 } 1419 }
1420 1420
@@ -1430,12 +1430,12 @@ repeat:
1430 /* user supplied disk type */ 1430 /* user supplied disk type */
1431 if (--type >= NUM_DISK_MINORS) { 1431 if (--type >= NUM_DISK_MINORS) {
1432 printk(KERN_WARNING "fd%d: invalid disk format", drive ); 1432 printk(KERN_WARNING "fd%d: invalid disk format", drive );
1433 end_request(CURRENT, 0); 1433 __blk_end_request_cur(CURRENT, -EIO);
1434 goto repeat; 1434 goto repeat;
1435 } 1435 }
1436 if (minor2disktype[type].drive_types > DriveType) { 1436 if (minor2disktype[type].drive_types > DriveType) {
1437 printk(KERN_WARNING "fd%d: unsupported disk format", drive ); 1437 printk(KERN_WARNING "fd%d: unsupported disk format", drive );
1438 end_request(CURRENT, 0); 1438 __blk_end_request_cur(CURRENT, -EIO);
1439 goto repeat; 1439 goto repeat;
1440 } 1440 }
1441 type = minor2disktype[type].index; 1441 type = minor2disktype[type].index;
@@ -1445,7 +1445,7 @@ repeat:
1445 } 1445 }
1446 1446
1447 if (CURRENT->sector + 1 > UDT->blocks) { 1447 if (CURRENT->sector + 1 > UDT->blocks) {
1448 end_request(CURRENT, 0); 1448 __blk_end_request_cur(CURRENT, -EIO);
1449 goto repeat; 1449 goto repeat;
1450 } 1450 }
1451 1451