diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2018-12-07 18:50:06 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-12-13 10:36:04 -0500 |
commit | 7f981bdcf55fda28a9a70c9e8151dd200771a0a8 (patch) | |
tree | 54945193614745940f34587f82af6b395468dcfa /sound | |
parent | fa11ab5688f744bc868356f3f14c3bb9f283a780 (diff) |
ASoC: Intel: Skylake: remove useless tests on HDaudio capabilities
bus->ppcap is now tested upfront, there is no need to re-check if the
hardware is exposed as needed. Remove tests and remove indentation.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/intel/skylake/skl.c | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c index 72e366bbba33..f04e9ec4432b 100644 --- a/sound/soc/intel/skylake/skl.c +++ b/sound/soc/intel/skylake/skl.c | |||
@@ -826,12 +826,10 @@ static void skl_probe_work(struct work_struct *work) | |||
826 | return; | 826 | return; |
827 | } | 827 | } |
828 | 828 | ||
829 | if (bus->ppcap) { | 829 | err = skl_machine_device_register(skl); |
830 | err = skl_machine_device_register(skl); | 830 | if (err < 0) { |
831 | if (err < 0) { | 831 | dev_err(bus->dev, "machine register failed: %d\n", err); |
832 | dev_err(bus->dev, "machine register failed: %d\n", err); | 832 | goto out_err; |
833 | goto out_err; | ||
834 | } | ||
835 | } | 833 | } |
836 | 834 | ||
837 | /* | 835 | /* |
@@ -1034,25 +1032,23 @@ static int skl_probe(struct pci_dev *pci, | |||
1034 | 1032 | ||
1035 | pci_set_drvdata(skl->pci, bus); | 1033 | pci_set_drvdata(skl->pci, bus); |
1036 | 1034 | ||
1037 | /* check if dsp is there */ | 1035 | /* create device for dsp clk */ |
1038 | if (bus->ppcap) { | 1036 | err = skl_clock_device_register(skl); |
1039 | /* create device for dsp clk */ | 1037 | if (err < 0) |
1040 | err = skl_clock_device_register(skl); | 1038 | goto out_clk_free; |
1041 | if (err < 0) | ||
1042 | goto out_clk_free; | ||
1043 | 1039 | ||
1044 | err = skl_find_machine(skl, (void *)pci_id->driver_data); | 1040 | err = skl_find_machine(skl, (void *)pci_id->driver_data); |
1045 | if (err < 0) | 1041 | if (err < 0) |
1046 | goto out_nhlt_free; | 1042 | goto out_nhlt_free; |
1047 | 1043 | ||
1048 | err = skl_init_dsp(skl); | 1044 | err = skl_init_dsp(skl); |
1049 | if (err < 0) { | 1045 | if (err < 0) { |
1050 | dev_dbg(bus->dev, "error failed to register dsp\n"); | 1046 | dev_dbg(bus->dev, "error failed to register dsp\n"); |
1051 | goto out_nhlt_free; | 1047 | goto out_nhlt_free; |
1052 | } | ||
1053 | skl->skl_sst->enable_miscbdcge = skl_enable_miscbdcge; | ||
1054 | skl->skl_sst->clock_power_gating = skl_clock_power_gating; | ||
1055 | } | 1048 | } |
1049 | skl->skl_sst->enable_miscbdcge = skl_enable_miscbdcge; | ||
1050 | skl->skl_sst->clock_power_gating = skl_clock_power_gating; | ||
1051 | |||
1056 | if (bus->mlcap) | 1052 | if (bus->mlcap) |
1057 | snd_hdac_ext_bus_get_ml_capabilities(bus); | 1053 | snd_hdac_ext_bus_get_ml_capabilities(bus); |
1058 | 1054 | ||