diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2020-08-03 15:37:31 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2020-08-03 15:37:31 +0300 |
commit | b1aa3db2c13ec0c63a73bd8fc5dfbfb112e3ff56 (patch) | |
tree | 92ce9158daae144032cc6297ab8fdbad12664247 /sound/soc/soc-devres.c | |
parent | 7c43b0c1d499c790cdb5623d27fdcef544ddb566 (diff) | |
parent | bcf876870b95592b52519ed4aafcf9d95999bc9c (diff) | |
download | linux-b1aa3db2c13ec0c63a73bd8fc5dfbfb112e3ff56.tar.xz |
Merge remote-tracking branch 'torvalds/master' into perf/core
Minor conflict in tools/perf/arch/arm/util/auxtrace.c as one fix there
was cherry-picked for the last perf/urgent pull req to Linus, so was
already there.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'sound/soc/soc-devres.c')
-rw-r--r-- | sound/soc/soc-devres.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/soc/soc-devres.c b/sound/soc/soc-devres.c index 11e5d7962370..4534a1c03e8e 100644 --- a/sound/soc/soc-devres.c +++ b/sound/soc/soc-devres.c @@ -48,7 +48,9 @@ EXPORT_SYMBOL_GPL(devm_snd_soc_register_dai); static void devm_component_release(struct device *dev, void *res) { - snd_soc_unregister_component(*(struct device **)res); + const struct snd_soc_component_driver **cmpnt_drv = res; + + snd_soc_unregister_component_by_driver(dev, *cmpnt_drv); } /** @@ -65,7 +67,7 @@ int devm_snd_soc_register_component(struct device *dev, const struct snd_soc_component_driver *cmpnt_drv, struct snd_soc_dai_driver *dai_drv, int num_dai) { - struct device **ptr; + const struct snd_soc_component_driver **ptr; int ret; ptr = devres_alloc(devm_component_release, sizeof(*ptr), GFP_KERNEL); @@ -74,7 +76,7 @@ int devm_snd_soc_register_component(struct device *dev, ret = snd_soc_register_component(dev, cmpnt_drv, dai_drv, num_dai); if (ret == 0) { - *ptr = dev; + *ptr = cmpnt_drv; devres_add(dev, ptr); } else { devres_free(ptr); |