summaryrefslogtreecommitdiff
path: root/drivers/mfd
diff options
context:
space:
mode:
authorShengjiu Wang <shengjiu.wang@freescale.com>2014-12-24 16:51:22 +0800
committerNitin Garg <nitin.garg@freescale.com>2015-09-17 09:20:30 -0500
commitf3764ab775482b25f54cf473fc37c18b12c9efb8 (patch)
tree0a4952722fe14a4c52b1b34168db98689f741744 /drivers/mfd
parent98304d94ecafa931df7482d8c2e603b08eb4ed18 (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.c13
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;