Skip to content

Commit 56ebbd1

Browse files
charleskeepaxbroonie
authored andcommitted
ASoC: cs42l43: Correct extraction of data pointer in suspend/resume
The current code is pulling the wrong pointer causing it to disable the wrong IRQ. Correct the code to pull the correct cs42l43 core data pointer. Fixes: 64353af ("ASoC: cs42l43: Add system suspend ops to disable IRQ") Signed-off-by: Charles Keepax <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 708181c commit 56ebbd1

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

sound/soc/codecs/cs42l43.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2364,7 +2364,8 @@ static int cs42l43_codec_runtime_resume(struct device *dev)
23642364

23652365
static int cs42l43_codec_suspend(struct device *dev)
23662366
{
2367-
struct cs42l43 *cs42l43 = dev_get_drvdata(dev);
2367+
struct cs42l43_codec *priv = dev_get_drvdata(dev);
2368+
struct cs42l43 *cs42l43 = priv->core;
23682369

23692370
disable_irq(cs42l43->irq);
23702371

@@ -2373,7 +2374,8 @@ static int cs42l43_codec_suspend(struct device *dev)
23732374

23742375
static int cs42l43_codec_suspend_noirq(struct device *dev)
23752376
{
2376-
struct cs42l43 *cs42l43 = dev_get_drvdata(dev);
2377+
struct cs42l43_codec *priv = dev_get_drvdata(dev);
2378+
struct cs42l43 *cs42l43 = priv->core;
23772379

23782380
enable_irq(cs42l43->irq);
23792381

@@ -2382,7 +2384,8 @@ static int cs42l43_codec_suspend_noirq(struct device *dev)
23822384

23832385
static int cs42l43_codec_resume(struct device *dev)
23842386
{
2385-
struct cs42l43 *cs42l43 = dev_get_drvdata(dev);
2387+
struct cs42l43_codec *priv = dev_get_drvdata(dev);
2388+
struct cs42l43 *cs42l43 = priv->core;
23862389

23872390
enable_irq(cs42l43->irq);
23882391

@@ -2391,7 +2394,8 @@ static int cs42l43_codec_resume(struct device *dev)
23912394

23922395
static int cs42l43_codec_resume_noirq(struct device *dev)
23932396
{
2394-
struct cs42l43 *cs42l43 = dev_get_drvdata(dev);
2397+
struct cs42l43_codec *priv = dev_get_drvdata(dev);
2398+
struct cs42l43 *cs42l43 = priv->core;
23952399

23962400
disable_irq(cs42l43->irq);
23972401

0 commit comments

Comments
 (0)