summaryrefslogtreecommitdiff
path: root/sound/soc/intel/atom/sst/sst_acpi.c
diff options
context:
space:
mode:
authorDouglas Anderson <dianders@chromium.org>2017-05-30 09:51:30 -0700
committerMark Brown <broonie@kernel.org>2017-06-06 19:58:49 +0100
commit98cf2c03b467fa67df58cb52adeb85b425cabcb2 (patch)
treeece5ab998581df5dc6d08c606a3e35d8f1edf082 /sound/soc/intel/atom/sst/sst_acpi.c
parent0809d9871d1066634f8abae9ecfbdfadecb8cd35 (diff)
ASoC: Intel: sst: Delete sst_shim_regs64; saved regs are never used
In commit 9a075265c6dc ("ASoC: Intel: sst: Remove unused function sst_restore_shim64()"), we deleted the sst_restore_shim64() since it was never used. ...but a quick look at the code shows that we should also be able to remove the sst_save_shim64() function and the structure members we were storing data in. Once we delete sst_save_shim64() there are no longer any users of the 'sst_shim_regs64' structure. That means we can delete it completely and also avoid allocating memory for it. This saves a whopping 136 bytes of devm allocated memory. We also get the nice benefit of avoiding an error path in the init code. Note that the saving code that we're removing (and the comments talking about how important it is to do the save) has been around since commit 336cfbb05edf ("ASoC: Intel: mrfld- add ACPI module"). Signed-off-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/atom/sst/sst_acpi.c')
-rw-r--r--sound/soc/intel/atom/sst/sst_acpi.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/sound/soc/intel/atom/sst/sst_acpi.c b/sound/soc/intel/atom/sst/sst_acpi.c
index 592f6afaf2a5..cf88cd1865fb 100644
--- a/sound/soc/intel/atom/sst/sst_acpi.c
+++ b/sound/soc/intel/atom/sst/sst_acpi.c
@@ -358,23 +358,9 @@ static int sst_acpi_probe(struct platform_device *pdev)
if (ret < 0)
return ret;
- /* need to save shim registers in BYT */
- ctx->shim_regs64 = devm_kzalloc(ctx->dev, sizeof(*ctx->shim_regs64),
- GFP_KERNEL);
- if (!ctx->shim_regs64) {
- ret = -ENOMEM;
- goto do_sst_cleanup;
- }
-
sst_configure_runtime_pm(ctx);
platform_set_drvdata(pdev, ctx);
return ret;
-
-do_sst_cleanup:
- sst_context_cleanup(ctx);
- platform_set_drvdata(pdev, NULL);
- dev_err(ctx->dev, "failed with %d\n", ret);
- return ret;
}
/**