task_register() conversion: play task
[paraslash.git] / resample_filter.c
index bd8ece91ef13f27b389fa5385ac922784bb7124c..e34af83992526c23b73f24c03c92fde88a3a9bd0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012-2013 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2012-2014 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -67,7 +67,7 @@ static void resample_open(struct filter_node *fn)
 
 static void resample_pre_select(struct sched *s, struct task *t)
 {
-       struct filter_node *fn = container_of(t, struct filter_node, task);
+       struct filter_node *fn = task_context(t);
        struct resample_context *ctx = fn->private_data;
        int ret = btr_node_status(fn->btrn, fn->min_iqs, BTR_NT_INTERNAL);
 
@@ -205,7 +205,7 @@ static int resample_frames(int16_t *in, size_t num_frames, bool have_more,
 static int resample_post_select(__a_unused struct sched *s, struct task *t)
 {
        int ret;
-       struct filter_node *fn = container_of(t, struct filter_node, task);
+       struct filter_node *fn = task_context(t);
        struct resample_context *ctx = fn->private_data;
        struct resample_filter_args_info *conf = fn->conf;
        struct btr_node *btrn = fn->btrn;
@@ -310,8 +310,5 @@ void resample_filter_init(struct filter *f)
        f->parse_config = resample_parse_config;
        f->free_config = resample_free_config;
        f->execute = resample_execute;
-       f->help = (struct ggo_help) {
-               .short_help = resample_filter_args_info_help,
-               .detailed_help = resample_filter_args_info_detailed_help
-       };
+       f->help = (struct ggo_help)DEFINE_GGO_HELP(resample_filter);
 }