diff options
| -rw-r--r-- | sound/soc/generic/simple-card.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index fb9240fdc9b7..7fe3009b1c43 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c | |||
| @@ -452,9 +452,8 @@ static int asoc_simple_card_parse_of(struct device_node *node, | |||
| 452 | } | 452 | } |
| 453 | 453 | ||
| 454 | /* Decrease the reference count of the device nodes */ | 454 | /* Decrease the reference count of the device nodes */ |
| 455 | static int asoc_simple_card_unref(struct platform_device *pdev) | 455 | static int asoc_simple_card_unref(struct snd_soc_card *card) |
| 456 | { | 456 | { |
| 457 | struct snd_soc_card *card = platform_get_drvdata(pdev); | ||
| 458 | struct snd_soc_dai_link *dai_link; | 457 | struct snd_soc_dai_link *dai_link; |
| 459 | int num_links; | 458 | int num_links; |
| 460 | 459 | ||
| @@ -556,7 +555,7 @@ static int asoc_simple_card_probe(struct platform_device *pdev) | |||
| 556 | return ret; | 555 | return ret; |
| 557 | 556 | ||
| 558 | err: | 557 | err: |
| 559 | asoc_simple_card_unref(pdev); | 558 | asoc_simple_card_unref(&priv->snd_card); |
| 560 | return ret; | 559 | return ret; |
| 561 | } | 560 | } |
| 562 | 561 | ||
| @@ -572,7 +571,7 @@ static int asoc_simple_card_remove(struct platform_device *pdev) | |||
| 572 | snd_soc_jack_free_gpios(&simple_card_mic_jack, 1, | 571 | snd_soc_jack_free_gpios(&simple_card_mic_jack, 1, |
| 573 | &simple_card_mic_jack_gpio); | 572 | &simple_card_mic_jack_gpio); |
| 574 | 573 | ||
| 575 | return asoc_simple_card_unref(pdev); | 574 | return asoc_simple_card_unref(card); |
| 576 | } | 575 | } |
| 577 | 576 | ||
| 578 | static const struct of_device_id asoc_simple_of_match[] = { | 577 | static const struct of_device_id asoc_simple_of_match[] = { |
