Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 353441
b: refs/heads/master
c: da2107d
h: refs/heads/master
i:
  353439: 7e5b0bd
v: v3
  • Loading branch information
Peter Ujfalusi authored and Mark Brown committed Jan 11, 2013
1 parent c111147 commit cea40f1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9523fcdcc02e812f3a0f4849b3af1b295ad50470
refs/heads/master: da2107d1e464811407675880e9ab78f057b7c9d6
21 changes: 3 additions & 18 deletions trunk/sound/soc/codecs/twl6040.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ struct twl6040_data {
u16 hf_right_step;
struct twl6040_jack_data hs_jack;
struct snd_soc_codec *codec;
struct workqueue_struct *workqueue;
struct mutex mutex;
};

Expand Down Expand Up @@ -404,8 +403,7 @@ static irqreturn_t twl6040_audio_handler(int irq, void *data)
struct snd_soc_codec *codec = data;
struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec);

queue_delayed_work(priv->workqueue, &priv->hs_jack.work,
msecs_to_jiffies(200));
schedule_delayed_work(&priv->hs_jack.work, msecs_to_jiffies(200));

return IRQ_HANDLED;
}
Expand Down Expand Up @@ -1162,10 +1160,6 @@ static int twl6040_probe(struct snd_soc_codec *codec)
return -EINVAL;
}

priv->workqueue = alloc_workqueue("twl6040-codec", 0, 0);
if (!priv->workqueue)
return -ENOMEM;

INIT_DELAYED_WORK(&priv->hs_jack.work, twl6040_accessory_work);

mutex_init(&priv->mutex);
Expand All @@ -1175,27 +1169,18 @@ static int twl6040_probe(struct snd_soc_codec *codec)
"twl6040_irq_plug", codec);
if (ret) {
dev_err(codec->dev, "PLUG IRQ request failed: %d\n", ret);
goto err;
return ret;
}

twl6040_init_chip(codec);

/* power on device */
ret = twl6040_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
if (!ret)
return 0;

err:
destroy_workqueue(priv->workqueue);
return ret;
return twl6040_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
}

static int twl6040_remove(struct snd_soc_codec *codec)
{
struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec);

twl6040_set_bias_level(codec, SND_SOC_BIAS_OFF);
destroy_workqueue(priv->workqueue);

return 0;
}
Expand Down

0 comments on commit cea40f1

Please sign in to comment.