static int __init as_init(void)
{
- return elv_register(&iosched_as);
+ elv_register(&iosched_as);
+
+ return 0;
}
static void __exit as_exit(void)
static int __init cfq_init(void)
{
- int ret;
-
/*
* could be 0 on HZ < 1000 setups
*/
if (cfq_slab_setup())
return -ENOMEM;
- ret = elv_register(&iosched_cfq);
- if (ret)
- cfq_slab_kill();
+ elv_register(&iosched_cfq);
- return ret;
+ return 0;
}
static void __exit cfq_exit(void)
static int __init deadline_init(void)
{
- return elv_register(&iosched_deadline);
+ elv_register(&iosched_deadline);
+
+ return 0;
}
static void __exit deadline_exit(void)
__elv_unregister_queue(q->elevator);
}
-int elv_register(struct elevator_type *e)
+void elv_register(struct elevator_type *e)
{
char *def = "";
def = " (default)";
printk(KERN_INFO "io scheduler %s registered%s\n", e->elevator_name, def);
- return 0;
}
EXPORT_SYMBOL_GPL(elv_register);
static int __init noop_init(void)
{
- return elv_register(&elevator_noop);
+ elv_register(&elevator_noop);
+
+ return 0;
}
static void __exit noop_exit(void)
/*
* io scheduler registration
*/
-extern int elv_register(struct elevator_type *);
+extern void elv_register(struct elevator_type *);
extern void elv_unregister(struct elevator_type *);
/*