diff options
author | Tejun Heo <tj@kernel.org> | 2009-04-22 22:05:19 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-04-28 01:37:36 -0400 |
commit | f06d9a2b52e246a66b606130cea3f0d7b7be17a7 (patch) | |
tree | 020df1f9d54b00c72d8af02ac0827d496597e75a /drivers/block/paride/pcd.c | |
parent | 40cbbb781d3eba5d6ac0860db078af490e5c7c6b (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/paride/pcd.c')
-rw-r--r-- | drivers/block/paride/pcd.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/block/paride/pcd.c b/drivers/block/paride/pcd.c index e91d4b4b014f..9fd57c2aa463 100644 --- a/drivers/block/paride/pcd.c +++ b/drivers/block/paride/pcd.c | |||
@@ -735,16 +735,16 @@ static void do_pcd_request(struct request_queue * q) | |||
735 | ps_set_intr(do_pcd_read, NULL, 0, nice); | 735 | ps_set_intr(do_pcd_read, NULL, 0, nice); |
736 | return; | 736 | return; |
737 | } else | 737 | } else |
738 | end_request(pcd_req, 0); | 738 | __blk_end_request_cur(pcd_req, -EIO); |
739 | } | 739 | } |
740 | } | 740 | } |
741 | 741 | ||
742 | static inline void next_request(int success) | 742 | static inline void next_request(int err) |
743 | { | 743 | { |
744 | unsigned long saved_flags; | 744 | unsigned long saved_flags; |
745 | 745 | ||
746 | spin_lock_irqsave(&pcd_lock, saved_flags); | 746 | spin_lock_irqsave(&pcd_lock, saved_flags); |
747 | end_request(pcd_req, success); | 747 | __blk_end_request_cur(pcd_req, err); |
748 | pcd_busy = 0; | 748 | pcd_busy = 0; |
749 | do_pcd_request(pcd_queue); | 749 | do_pcd_request(pcd_queue); |
750 | spin_unlock_irqrestore(&pcd_lock, saved_flags); | 750 | spin_unlock_irqrestore(&pcd_lock, saved_flags); |
@@ -781,7 +781,7 @@ static void pcd_start(void) | |||
781 | 781 | ||
782 | if (pcd_command(pcd_current, rd_cmd, 2048, "read block")) { | 782 | if (pcd_command(pcd_current, rd_cmd, 2048, "read block")) { |
783 | pcd_bufblk = -1; | 783 | pcd_bufblk = -1; |
784 | next_request(0); | 784 | next_request(-EIO); |
785 | return; | 785 | return; |
786 | } | 786 | } |
787 | 787 | ||
@@ -796,7 +796,7 @@ static void do_pcd_read(void) | |||
796 | pcd_retries = 0; | 796 | pcd_retries = 0; |
797 | pcd_transfer(); | 797 | pcd_transfer(); |
798 | if (!pcd_count) { | 798 | if (!pcd_count) { |
799 | next_request(1); | 799 | next_request(0); |
800 | return; | 800 | return; |
801 | } | 801 | } |
802 | 802 | ||
@@ -815,7 +815,7 @@ static void do_pcd_read_drq(void) | |||
815 | return; | 815 | return; |
816 | } | 816 | } |
817 | pcd_bufblk = -1; | 817 | pcd_bufblk = -1; |
818 | next_request(0); | 818 | next_request(-EIO); |
819 | return; | 819 | return; |
820 | } | 820 | } |
821 | 821 | ||