All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kai Vehmanen <kai.vehmanen@linux.intel.com>
To: alsa-devel@alsa-project.org, broonie@kernel.org
Cc: kai.vehmanen@linux.intel.com, yung-chuan.liao@linux.intel.com,
	Peter Ujfalusi <peter.ujfalusi@linux.intel.com>,
	lgirdwood@gmail.com, pierre-louis.bossart@linux.intel.com,
	ranjani.sridharan@linux.intel.com, daniel.baluta@nxp.com
Subject: [PATCH 7/7] ASoC: SOF: Intel: hda: Remove conditions against CONFIG_PCI
Date: Fri, 21 May 2021 12:28:04 +0300	[thread overview]
Message-ID: <20210521092804.3721324-8-kai.vehmanen@linux.intel.com> (raw)
In-Reply-To: <20210521092804.3721324-1-kai.vehmanen@linux.intel.com>

From: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>

The HDA support can only be compiled when SND_SOC_SOF_PCI is enabled which
depends on CONFIG_PCI.

This makes the IS_ENABLED(CONFIG_PCI) checks redundant in the code, they
will resolve to true all the time.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
---
 sound/soc/sof/intel/hda.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c
index 5658e4b6273d..126232a76a10 100644
--- a/sound/soc/sof/intel/hda.c
+++ b/sound/soc/sof/intel/hda.c
@@ -277,10 +277,12 @@ struct hda_dsp_msg_code {
 	const char *msg;
 };
 
-static bool hda_use_msi = IS_ENABLED(CONFIG_PCI);
 #if IS_ENABLED(CONFIG_SND_SOC_SOF_DEBUG)
+static bool hda_use_msi = true;
 module_param_named(use_msi, hda_use_msi, bool, 0444);
 MODULE_PARM_DESC(use_msi, "SOF HDA use PCI MSI mode");
+#else
+#define hda_use_msi	(1)
 #endif
 
 static char *hda_model;
@@ -485,9 +487,7 @@ static int hda_init(struct snd_sof_dev *sdev)
 
 	/* initialise hdac bus */
 	bus->addr = pci_resource_start(pci, 0);
-#if IS_ENABLED(CONFIG_PCI)
 	bus->remap_addr = pci_ioremap_bar(pci, 0);
-#endif
 	if (!bus->remap_addr) {
 		dev_err(bus->dev, "error: ioremap error\n");
 		return -ENXIO;
@@ -799,9 +799,7 @@ int hda_dsp_probe(struct snd_sof_dev *sdev)
 		goto hdac_bus_unmap;
 
 	/* DSP base */
-#if IS_ENABLED(CONFIG_PCI)
 	sdev->bar[HDA_DSP_BAR] = pci_ioremap_bar(pci, HDA_DSP_BAR);
-#endif
 	if (!sdev->bar[HDA_DSP_BAR]) {
 		dev_err(sdev->dev, "error: ioremap error\n");
 		ret = -ENXIO;
-- 
2.31.0


  parent reply	other threads:[~2021-05-21  9:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-21  9:27 [PATCH 0/7] ASoC: SOF: code cleanups for 5.14 Kai Vehmanen
2021-05-21  9:27 ` [PATCH 1/7] ASoC: SOF: Check desc->ops directly in acpi/pci/of probe functions Kai Vehmanen
2021-05-21  9:27 ` [PATCH 2/7] ASoC: SOF: pci: No need to cast second time to save the desc Kai Vehmanen
2021-05-21  9:28 ` [PATCH 3/7] ASoC: SOF: ops: print out the polling register Kai Vehmanen
2021-05-21  9:28 ` [PATCH 4/7] ASoC: SOF: loader: Use snd_sof_dsp_block_read() instead sof_block_read() Kai Vehmanen
2021-05-21  9:28 ` [PATCH 5/7] ASoC: SOF: topology: fix assignment to use le32_to_cpu Kai Vehmanen
2021-05-21  9:28 ` [PATCH 6/7] ASoC: SOF: ops: don't return void value Kai Vehmanen
2021-05-21  9:28 ` Kai Vehmanen [this message]
2021-05-21 15:08 ` [PATCH 0/7] ASoC: SOF: code cleanups for 5.14 Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210521092804.3721324-8-kai.vehmanen@linux.intel.com \
    --to=kai.vehmanen@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=daniel.baluta@nxp.com \
    --cc=lgirdwood@gmail.com \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=yung-chuan.liao@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.