summaryrefslogtreecommitdiffstats
path: root/include/linux/elevator.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2012-03-05 13:14:57 -0800
committerJens Axboe <axboe@kernel.dk>2012-03-06 21:27:21 +0100
commitb2fab5acd28ead6f0dd6c3996ba23f0ef1772f15 (patch)
treeb0b96984e1a4d9c856edc9ddfc36e427951c5a86 /include/linux/elevator.h
parent5a5bafdc396b1da7570f84fb96a0f8a288970c5e (diff)
elevator: make elevator_init_fn() return 0/-errno
elevator_ops->elevator_init_fn() has a weird return value. It returns a void * which the caller should assign to q->elevator->elevator_data and %NULL return denotes init failure. Update such that it returns integer 0/-errno and sets elevator_data directly as necessary. This makes the interface more conventional and eases further cleanup. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/elevator.h')
-rw-r--r--include/linux/elevator.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/elevator.h b/include/linux/elevator.h
index 7d4e0356f32..97fb2557a18 100644
--- a/include/linux/elevator.h
+++ b/include/linux/elevator.h
@@ -33,7 +33,7 @@ typedef void (elevator_put_req_fn) (struct request *);
typedef void (elevator_activate_req_fn) (struct request_queue *, struct request *);
typedef void (elevator_deactivate_req_fn) (struct request_queue *, struct request *);
-typedef void *(elevator_init_fn) (struct request_queue *);
+typedef int (elevator_init_fn) (struct request_queue *);
typedef void (elevator_exit_fn) (struct elevator_queue *);
struct elevator_ops