All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kai-Heng Feng <kai.heng.feng@canonical.com>
To: tiwai@suse.com
Cc: "Kai-Heng Feng" <kai.heng.feng@canonical.com>,
	"Jaroslav Kysela" <perex@perex.cz>,
	"Pierre-Louis Bossart" <pierre-louis.bossart@linux.intel.com>,
	"Mark Brown" <broonie@kernel.org>,
	"Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Keyon Jie" <yang.jie@linux.intel.com>,
	"Evan Green" <evgreen@chromium.org>,
	alsa-devel@alsa-project.org (moderated list:SOUND),
	linux-kernel@vger.kernel.org (open list)
Subject: [PATCH 1/2] ALSA: hda: Use dev_to_hdac_dev macro
Date: Tue,  5 May 2020 11:03:52 +0800	[thread overview]
Message-ID: <20200505030357.28004-1-kai.heng.feng@canonical.com> (raw)

Use dev_to_hdac_dev() instead of container_of().

No functional change intended.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 sound/hda/ext/hdac_ext_bus.c | 2 +-
 sound/hda/hdac_device.c      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/hda/ext/hdac_ext_bus.c b/sound/hda/ext/hdac_ext_bus.c
index 73bfa71845f6..d0a604c939df 100644
--- a/sound/hda/ext/hdac_ext_bus.c
+++ b/sound/hda/ext/hdac_ext_bus.c
@@ -62,7 +62,7 @@ EXPORT_SYMBOL_GPL(snd_hdac_ext_bus_exit);
 
 static void default_release(struct device *dev)
 {
-	snd_hdac_ext_bus_device_exit(container_of(dev, struct hdac_device, dev));
+	snd_hdac_ext_bus_device_exit(dev_to_hdac_dev(dev));
 }
 
 /**
diff --git a/sound/hda/hdac_device.c b/sound/hda/hdac_device.c
index e3119f5cb0d5..333220f0f8af 100644
--- a/sound/hda/hdac_device.c
+++ b/sound/hda/hdac_device.c
@@ -20,7 +20,7 @@ static int get_codec_vendor_name(struct hdac_device *codec);
 
 static void default_release(struct device *dev)
 {
-	snd_hdac_device_exit(container_of(dev, struct hdac_device, dev));
+	snd_hdac_device_exit(dev_to_hdac_dev(dev));
 }
 
 /**
-- 
2.17.1


WARNING: multiple messages have this Message-ID (diff)
From: Kai-Heng Feng <kai.heng.feng@canonical.com>
To: tiwai@suse.com
Cc: "Kai-Heng Feng" <kai.heng.feng@canonical.com>,
	"moderated list:SOUND" <alsa-devel@alsa-project.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Keyon Jie" <yang.jie@linux.intel.com>,
	"Pierre-Louis Bossart" <pierre-louis.bossart@linux.intel.com>,
	"Evan Green" <evgreen@chromium.org>,
	"Mark Brown" <broonie@kernel.org>,
	"Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"open list" <linux-kernel@vger.kernel.org>
Subject: [PATCH 1/2] ALSA: hda: Use dev_to_hdac_dev macro
Date: Tue,  5 May 2020 11:03:52 +0800	[thread overview]
Message-ID: <20200505030357.28004-1-kai.heng.feng@canonical.com> (raw)

Use dev_to_hdac_dev() instead of container_of().

No functional change intended.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 sound/hda/ext/hdac_ext_bus.c | 2 +-
 sound/hda/hdac_device.c      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/hda/ext/hdac_ext_bus.c b/sound/hda/ext/hdac_ext_bus.c
index 73bfa71845f6..d0a604c939df 100644
--- a/sound/hda/ext/hdac_ext_bus.c
+++ b/sound/hda/ext/hdac_ext_bus.c
@@ -62,7 +62,7 @@ EXPORT_SYMBOL_GPL(snd_hdac_ext_bus_exit);
 
 static void default_release(struct device *dev)
 {
-	snd_hdac_ext_bus_device_exit(container_of(dev, struct hdac_device, dev));
+	snd_hdac_ext_bus_device_exit(dev_to_hdac_dev(dev));
 }
 
 /**
diff --git a/sound/hda/hdac_device.c b/sound/hda/hdac_device.c
index e3119f5cb0d5..333220f0f8af 100644
--- a/sound/hda/hdac_device.c
+++ b/sound/hda/hdac_device.c
@@ -20,7 +20,7 @@ static int get_codec_vendor_name(struct hdac_device *codec);
 
 static void default_release(struct device *dev)
 {
-	snd_hdac_device_exit(container_of(dev, struct hdac_device, dev));
+	snd_hdac_device_exit(dev_to_hdac_dev(dev));
 }
 
 /**
-- 
2.17.1


             reply	other threads:[~2020-05-05  3:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-05  3:03 Kai-Heng Feng [this message]
2020-05-05  3:03 ` [PATCH 1/2] ALSA: hda: Use dev_to_hdac_dev macro Kai-Heng Feng
2020-05-05  3:03 ` [PATCH 2/2] ALSA: hda: Use hdac_to_hda_codec macro Kai-Heng Feng
2020-05-05  3:03   ` Kai-Heng Feng
2020-05-05  7:08   ` Takashi Iwai
2020-05-05  7:08     ` Takashi Iwai
2020-05-05  7:08 ` [PATCH 1/2] ALSA: hda: Use dev_to_hdac_dev macro Takashi Iwai
2020-05-05  7:08   ` Takashi Iwai

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=20200505030357.28004-1-kai.heng.feng@canonical.com \
    --to=kai.heng.feng@canonical.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=amadeuszx.slawinski@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=evgreen@chromium.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=tglx@linutronix.de \
    --cc=tiwai@suse.com \
    --cc=yang.jie@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.