return 0;
}
-static struct rsnd_mod_ops rsnd_src_non_ops = {
- .name = "src (non)",
-};
-
/*
* Gen1 functions
*/
char name[RSND_SRC_NAME_SIZE];
int i, nr;
+ ops = NULL;
+ if (rsnd_is_gen1(priv))
+ ops = &rsnd_src_gen1_ops;
+ if (rsnd_is_gen2(priv))
+ ops = &rsnd_src_gen2_ops;
+ if (!ops) {
+ dev_err(dev, "unknown Generation\n");
+ return -EIO;
+ }
+
rsnd_of_parse_src(pdev, of_data, priv);
/*
src->info = &info->src_info[i];
src->clk = clk;
- ops = &rsnd_src_non_ops;
- if (rsnd_is_gen1(priv))
- ops = &rsnd_src_gen1_ops;
- if (rsnd_is_gen2(priv))
- ops = &rsnd_src_gen2_ops;
-
rsnd_mod_init(priv, &src->mod, ops, RSND_MOD_SRC, i);
dev_dbg(dev, "SRC%d probed\n", i);