All of lore.kernel.org
 help / color / mirror / Atom feed
From: jeeja.kp@intel.com
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, patches.audio@intel.com, broonie@kernel.org,
	liam.r.girdwood@intel.com, Jeeja KP <jeeja.kp@intel.com>,
	Vinod Koul <vinod.koul@intel.com>
Subject: [PATCH v2 07/11] ASoC: Intel: Skylake: remove hard coded ACPI path
Date: Fri, 24 Mar 2017 23:10:30 +0530	[thread overview]
Message-ID: <1490377234-30257-8-git-send-email-jeeja.kp@intel.com> (raw)
In-Reply-To: <1490377234-30257-1-git-send-email-jeeja.kp@intel.com>

From: Vinod Koul <vinod.koul@intel.com>

We should not hard code the ACPI path to get acpi_handle. Instead use
ACPI_HANDLE macro to do the job.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
---
 sound/soc/intel/skylake/skl-nhlt.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/sound/soc/intel/skylake/skl-nhlt.c b/sound/soc/intel/skylake/skl-nhlt.c
index 7eb9c41..e3f0667 100644
--- a/sound/soc/intel/skylake/skl-nhlt.c
+++ b/sound/soc/intel/skylake/skl-nhlt.c
@@ -24,8 +24,6 @@
 static u8 OSC_UUID[16] = {0x6E, 0x88, 0x9F, 0xA6, 0xEB, 0x6C, 0x94, 0x45,
 				0xA4, 0x1F, 0x7B, 0x5D, 0xCE, 0x24, 0xC5, 0x53};
 
-#define DSDT_NHLT_PATH "\\_SB.PCI0.HDAS"
-
 struct nhlt_acpi_table *skl_nhlt_init(struct device *dev)
 {
 	acpi_handle handle;
@@ -33,8 +31,9 @@ struct nhlt_acpi_table *skl_nhlt_init(struct device *dev)
 	struct nhlt_resource_desc  *nhlt_ptr = NULL;
 	struct nhlt_acpi_table *nhlt_table = NULL;
 
-	if (ACPI_FAILURE(acpi_get_handle(NULL, DSDT_NHLT_PATH, &handle))) {
-		dev_err(dev, "Requested NHLT device not found\n");
+	handle = ACPI_HANDLE(dev);
+	if (!handle) {
+		dev_err(dev, "Didn't find ACPI_HANDLE\n");
 		return NULL;
 	}
 
-- 
2.5.0

  parent reply	other threads:[~2017-03-24 17:28 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-24 17:40 [PATCH v2 00/11] ASoC: Intel: Skylake: More driver updates jeeja.kp
2017-03-24 17:40 ` [PATCH v2 01/11] ALSA: hda: Fix LLCH register read jeeja.kp
2017-03-24 18:37   ` Takashi Iwai
2017-03-24 17:40 ` [PATCH v2 02/11] ASoC: Intel: Skylake: Use the sig_bits to define dai bps capability jeeja.kp
2017-03-24 17:40 ` [PATCH v2 03/11] ASoC: hdac_hdmi: Update sig_bits based on converter capability jeeja.kp
2017-03-24 17:40 ` [PATCH v2 04/11] ASoC: Intel: Skylake: Add 16-bit constraint to FE bxt_rt298 machine jeeja.kp
2017-03-24 17:40 ` [PATCH v2 05/11] ASoC: Intel: Skylake: Don't unload module when in use jeeja.kp
2017-03-24 17:40 ` [PATCH v2 06/11] ASoC: Intel: Skylake: Remove redundant vmixer handler jeeja.kp
2017-03-24 17:40 ` jeeja.kp [this message]
2017-03-24 17:40 ` [PATCH v2 08/11] ASoC: Intel: Skylake: Rearrangement of code to cleanup SKL SST library jeeja.kp
2017-03-24 17:40 ` [PATCH v2 09/11] ASoC: Intel: Skylake: Fix DMA position reporting for capture stream jeeja.kp
2017-03-24 18:38   ` Takashi Iwai
2017-03-24 18:43     ` Ughreja, Rakesh A
2017-03-24 18:49       ` Takashi Iwai
2017-03-24 20:51         ` Ughreja, Rakesh A
2017-03-27 10:29           ` Vinod Koul
2017-03-27 13:12             ` Takashi Iwai
2017-03-28  8:45               ` Vinod Koul
2017-03-29 11:54   ` Applied "ASoC: Intel: Skylake: Fix DMA position reporting for capture stream" to the asoc tree Mark Brown
2017-03-24 17:40 ` [PATCH v2 10/11] ASoC: Intel: Skylake: Fix module state after unbind and delete jeeja.kp
2017-03-24 17:40 ` [PATCH v2 11/11] ASoC: Intel: Skylake: Add support for deferred DSP module bind jeeja.kp
2017-03-27 10:31 ` [PATCH v2 00/11] ASoC: Intel: Skylake: More driver updates Vinod Koul

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=1490377234-30257-8-git-send-email-jeeja.kp@intel.com \
    --to=jeeja.kp@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=liam.r.girdwood@intel.com \
    --cc=patches.audio@intel.com \
    --cc=tiwai@suse.de \
    --cc=vinod.koul@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.