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/sbus | |
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/sbus')
-rw-r--r-- | drivers/sbus/char/jsflash.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/sbus/char/jsflash.c b/drivers/sbus/char/jsflash.c index a85ad05e8548..09617884a50b 100644 --- a/drivers/sbus/char/jsflash.c +++ b/drivers/sbus/char/jsflash.c | |||
@@ -192,25 +192,25 @@ static void jsfd_do_request(struct request_queue *q) | |||
192 | size_t len = req->current_nr_sectors << 9; | 192 | size_t len = req->current_nr_sectors << 9; |
193 | 193 | ||
194 | if ((offset + len) > jdp->dsize) { | 194 | if ((offset + len) > jdp->dsize) { |
195 | end_request(req, 0); | 195 | __blk_end_request_cur(req, -EIO); |
196 | continue; | 196 | continue; |
197 | } | 197 | } |
198 | 198 | ||
199 | if (rq_data_dir(req) != READ) { | 199 | if (rq_data_dir(req) != READ) { |
200 | printk(KERN_ERR "jsfd: write\n"); | 200 | printk(KERN_ERR "jsfd: write\n"); |
201 | end_request(req, 0); | 201 | __blk_end_request_cur(req, -EIO); |
202 | continue; | 202 | continue; |
203 | } | 203 | } |
204 | 204 | ||
205 | if ((jdp->dbase & 0xff000000) != 0x20000000) { | 205 | if ((jdp->dbase & 0xff000000) != 0x20000000) { |
206 | printk(KERN_ERR "jsfd: bad base %x\n", (int)jdp->dbase); | 206 | printk(KERN_ERR "jsfd: bad base %x\n", (int)jdp->dbase); |
207 | end_request(req, 0); | 207 | __blk_end_request_cur(req, -EIO); |
208 | continue; | 208 | continue; |
209 | } | 209 | } |
210 | 210 | ||
211 | jsfd_read(req->buffer, jdp->dbase + offset, len); | 211 | jsfd_read(req->buffer, jdp->dbase + offset, len); |
212 | 212 | ||
213 | end_request(req, 1); | 213 | __blk_end_request_cur(req, 0); |
214 | } | 214 | } |
215 | } | 215 | } |
216 | 216 | ||