diff options
author | Shengjiu Wang <shengjiu.wang@freescale.com> | 2014-12-24 16:51:22 +0800 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2015-04-14 14:01:22 -0500 |
commit | 4c8e9916128f05f9b4115e1ee1af4a1e7d800c4a (patch) | |
tree | a356328e9b01f4b5e0eae51fd3c369bc4696fcb3 /drivers/mfd | |
parent | 01ffd8e5e828d20214a196e64b981c9fd94c913e (diff) |
MLK-10055-2: mfd: si476x-i2c: sound is registered when no FM module attached
The si476x_core_get_revision_info will send i2c command to FM module, if it
return error, there is no FM modules attached, so we need't to register the
sound card. otherwise, the pulseaudio will access this sound card, but return
a lot of i2c error.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/si476x-i2c.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/mfd/si476x-i2c.c b/drivers/mfd/si476x-i2c.c index d9cc07a0a2cf..2ca61bf58190 100644 --- a/drivers/mfd/si476x-i2c.c +++ b/drivers/mfd/si476x-i2c.c @@ -810,15 +810,14 @@ static int si476x_core_probe(struct i2c_client *client, core->power_state = SI476X_POWER_UP_FULL; si476x_core_set_power_state(core, SI476X_POWER_DOWN); + rval = si476x_core_get_revision_info(core); + if (rval < 0) { + rval = -ENODEV; + goto free_kfifo; + } + if (of_property_read_bool(client->dev.of_node, "revision-a10")) core->revision = SI476X_REVISION_A10; - else { - rval = si476x_core_get_revision_info(core); - if (rval < 0) { - rval = -ENODEV; - goto free_kfifo; - } - } cell_num = 0; |