aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>2006-10-31 01:07:09 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-31 11:06:59 -0500
commit2fe30a34a141c2188ff2cdd670d031088d9c5d20 (patch)
treeb4b13167ad4f0c2520f9bd2710f8b429b1921e27
parent33f775eea185e8df7701c4afc2c8fcee85c83282 (diff)
[PATCH] uml ubd driver: convert do_ubd to a boolean variable
do_ubd is actually just a boolean variable - the way it is used currently is a leftover from the old 2.4 block layer, but it is still used; its use is suspicious, but removing it would be too intrusive for now and needs more thinking. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/um/drivers/ubd_kern.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index 6cd8988e8fd0..460d669b4774 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -112,7 +112,9 @@ static DEFINE_SPINLOCK(ubd_io_lock);
112 112
113static DEFINE_MUTEX(ubd_lock); 113static DEFINE_MUTEX(ubd_lock);
114 114
115static void (*do_ubd)(void); 115/* XXX - this made sense in 2.4 days, now it's only used as a boolean, and
116 * probably it doesn't make sense even for that. */
117static int do_ubd;
116 118
117static int ubd_open(struct inode * inode, struct file * filp); 119static int ubd_open(struct inode * inode, struct file * filp);
118static int ubd_release(struct inode * inode, struct file * file); 120static int ubd_release(struct inode * inode, struct file * file);
@@ -508,6 +510,7 @@ static inline void ubd_finish(struct request *req, int error)
508 spin_unlock(&ubd_io_lock); 510 spin_unlock(&ubd_io_lock);
509} 511}
510 512
513/* XXX - move this inside ubd_intr. */
511/* Called without ubd_io_lock held, and only in interrupt context. */ 514/* Called without ubd_io_lock held, and only in interrupt context. */
512static void ubd_handler(void) 515static void ubd_handler(void)
513{ 516{
@@ -515,7 +518,7 @@ static void ubd_handler(void)
515 struct request *rq = elv_next_request(ubd_queue); 518 struct request *rq = elv_next_request(ubd_queue);
516 int n; 519 int n;
517 520
518 do_ubd = NULL; 521 do_ubd = 0;
519 intr_count++; 522 intr_count++;
520 n = os_read_file(thread_fd, &req, sizeof(req)); 523 n = os_read_file(thread_fd, &req, sizeof(req));
521 if(n != sizeof(req)){ 524 if(n != sizeof(req)){
@@ -1043,7 +1046,7 @@ static void do_ubd_request(request_queue_t *q)
1043 return; 1046 return;
1044 err = prepare_request(req, &io_req); 1047 err = prepare_request(req, &io_req);
1045 if(!err){ 1048 if(!err){
1046 do_ubd = ubd_handler; 1049 do_ubd = 1;
1047 n = os_write_file(thread_fd, (char *) &io_req, 1050 n = os_write_file(thread_fd, (char *) &io_req,
1048 sizeof(io_req)); 1051 sizeof(io_req));
1049 if(n != sizeof(io_req)) 1052 if(n != sizeof(io_req))