30 Jan
2014
30 Jan
'14
10:02 p.m.
On Sun, Jan 26, 2014 at 07:45:36PM +0100, Jean-Francois Moine wrote:
+static void tda_get_encoder(struct tda_priv *priv) +{
- struct snd_soc_codec *codec = priv->codec;
- struct device_node *np;
- struct i2c_client *i2c_client;
- static const struct of_device_id tda_dt[] = {
{ .compatible = "nxp,tda998x" },
{ },
- };
- /* search the tda998x device */
- np = of_find_matching_node_and_match(NULL, tda_dt, NULL);
- if (!np || !of_device_is_available(np)) {
dev_err(codec->dev, "No tda998x in DT\n");
return;
- }
- i2c_client = of_find_i2c_device_by_node(np);
Like I said last time I'd really expect this to look like a MFD (or generally a proper CODEC driver) so we don't get this weird probe ordering stuff. If you don't think that's sensible for some reason it'd be helpful to understand why.