Skip to content

Commit

Permalink
ASoC: Intel: Skylake: remove useless tests on HDaudio capabilities
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pierre-Louis Bossart authored and Mark Brown committed Dec 13, 2018
1 parent fa11ab5 commit 7f981bd
Showing 1 changed file with 18 additions and 22 deletions.
40 changes: 18 additions & 22 deletions sound/soc/intel/skylake/skl.c
Original file line number Diff line number Diff line change
Expand Up @@ -826,12 +826,10 @@ static void skl_probe_work(struct work_struct *work)
return;
}

if (bus->ppcap) {
err = skl_machine_device_register(skl);
if (err < 0) {
dev_err(bus->dev, "machine register failed: %d\n", err);
goto out_err;
}
err = skl_machine_device_register(skl);
if (err < 0) {
dev_err(bus->dev, "machine register failed: %d\n", err);
goto out_err;
}

/*
Expand Down Expand Up @@ -1034,25 +1032,23 @@ static int skl_probe(struct pci_dev *pci,

pci_set_drvdata(skl->pci, bus);

/* check if dsp is there */
if (bus->ppcap) {
/* create device for dsp clk */
err = skl_clock_device_register(skl);
if (err < 0)
goto out_clk_free;
/* create device for dsp clk */
err = skl_clock_device_register(skl);
if (err < 0)
goto out_clk_free;

err = skl_find_machine(skl, (void *)pci_id->driver_data);
if (err < 0)
goto out_nhlt_free;
err = skl_find_machine(skl, (void *)pci_id->driver_data);
if (err < 0)
goto out_nhlt_free;

err = skl_init_dsp(skl);
if (err < 0) {
dev_dbg(bus->dev, "error failed to register dsp\n");
goto out_nhlt_free;
}
skl->skl_sst->enable_miscbdcge = skl_enable_miscbdcge;
skl->skl_sst->clock_power_gating = skl_clock_power_gating;
err = skl_init_dsp(skl);
if (err < 0) {
dev_dbg(bus->dev, "error failed to register dsp\n");
goto out_nhlt_free;
}
skl->skl_sst->enable_miscbdcge = skl_enable_miscbdcge;
skl->skl_sst->clock_power_gating = skl_clock_power_gating;

if (bus->mlcap)
snd_hdac_ext_bus_get_ml_capabilities(bus);

Expand Down

0 comments on commit 7f981bd

Please sign in to comment.