Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1298665 > unrolled thread
| Started by | Geliang Tang <geliangtang@163.com> |
|---|---|
| First post | 2015-12-28 15:50 +0100 |
| Last post | 2015-12-28 15:50 +0100 |
| Articles | 3 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH 1/4] ALSA: core: use dev_to_snd_card Geliang Tang <geliangtang@163.com> - 2015-12-28 15:50 +0100
[PATCH 2/4] ALSA: hdac: drop unused dev_to_hdac macro Geliang Tang <geliangtang@163.com> - 2015-12-28 15:50 +0100
[PATCH 3/4] ALSA: hdac: use dev_to_hdac_dev Geliang Tang <geliangtang@163.com> - 2015-12-28 15:50 +0100
| From | Geliang Tang <geliangtang@163.com> |
|---|---|
| Date | 2015-12-28 15:50 +0100 |
| Subject | [PATCH 1/4] ALSA: core: use dev_to_snd_card |
| Message-ID | <qKHhv-3pQ-15@gated-at.bofh.it> |
Use dev_to_snd_card() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
---
sound/core/init.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/core/init.c b/sound/core/init.c
index 20f37fb..fcb84e1 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -639,7 +639,7 @@ static ssize_t
card_id_show_attr(struct device *dev,
struct device_attribute *attr, char *buf)
{
- struct snd_card *card = container_of(dev, struct snd_card, card_dev);
+ struct snd_card *card = dev_to_snd_card(dev);
return snprintf(buf, PAGE_SIZE, "%s\n", card->id);
}
@@ -647,7 +647,7 @@ static ssize_t
card_id_store_attr(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{
- struct snd_card *card = container_of(dev, struct snd_card, card_dev);
+ struct snd_card *card = dev_to_snd_card(dev);
char buf1[sizeof(card->id)];
size_t copy = count > sizeof(card->id) - 1 ?
sizeof(card->id) - 1 : count;
@@ -679,7 +679,7 @@ static ssize_t
card_number_show_attr(struct device *dev,
struct device_attribute *attr, char *buf)
{
- struct snd_card *card = container_of(dev, struct snd_card, card_dev);
+ struct snd_card *card = dev_to_snd_card(dev);
return snprintf(buf, PAGE_SIZE, "%i\n", card->number);
}
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Geliang Tang <geliangtang@163.com> |
|---|---|
| Date | 2015-12-28 15:50 +0100 |
| Subject | [PATCH 2/4] ALSA: hdac: drop unused dev_to_hdac macro |
| Message-ID | <qKHhw-3pQ-25@gated-at.bofh.it> |
| In reply to | #1298665 |
dev_to_hdac is not used anymore so drop it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
---
sound/hda/ext/hdac_ext_bus.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/sound/hda/ext/hdac_ext_bus.c b/sound/hda/ext/hdac_ext_bus.c
index 2433f7c..58f6b98 100644
--- a/sound/hda/ext/hdac_ext_bus.c
+++ b/sound/hda/ext/hdac_ext_bus.c
@@ -197,8 +197,6 @@ void snd_hdac_ext_bus_device_remove(struct hdac_ext_bus *ebus)
}
}
EXPORT_SYMBOL_GPL(snd_hdac_ext_bus_device_remove);
-#define dev_to_hdac(dev) (container_of((dev), \
- struct hdac_device, dev))
static inline struct hdac_ext_driver *get_edrv(struct device *dev)
{
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Geliang Tang <geliangtang@163.com> |
|---|---|
| Date | 2015-12-28 15:50 +0100 |
| Subject | [PATCH 3/4] ALSA: hdac: use dev_to_hdac_dev |
| Message-ID | <qKHhw-3pQ-29@gated-at.bofh.it> |
| In reply to | #1298665 |
Use dev_to_hdac_dev() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@163.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 58f6b98..2522943 100644
--- a/sound/hda/ext/hdac_ext_bus.c
+++ b/sound/hda/ext/hdac_ext_bus.c
@@ -122,7 +122,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 e361024..959f7d9 100644
--- a/sound/hda/hdac_device.c
+++ b/sound/hda/hdac_device.c
@@ -18,7 +18,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.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web