* [PATCH 0/2] ALSA: hda: Cleanup helpers
@ 2020-05-16 6:28 Takashi Iwai
2020-05-16 6:28 ` [PATCH 1/2] ALSA: hda: Drop unused snd_hda_queue_unsol_event() Takashi Iwai
2020-05-16 6:28 ` [PATCH 2/2] ALSA: hda: Unexport some local helper functions Takashi Iwai
0 siblings, 2 replies; 3+ messages in thread
From: Takashi Iwai @ 2020-05-16 6:28 UTC (permalink / raw)
To: alsa-devel
Some helper functions are used only locally or not used, here just
a simple cleanup.
Takashi
===
Takashi Iwai (2):
ALSA: hda: Drop unused snd_hda_queue_unsol_event()
ALSA: hda: Unexport some local helper functions
include/sound/hda_codec.h | 7 -------
include/sound/hdaudio.h | 3 ---
sound/hda/hdac_bus.c | 2 --
sound/hda/hdac_controller.c | 1 +
sound/hda/local.h | 3 +++
5 files changed, 4 insertions(+), 12 deletions(-)
--
2.16.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] ALSA: hda: Drop unused snd_hda_queue_unsol_event()
2020-05-16 6:28 [PATCH 0/2] ALSA: hda: Cleanup helpers Takashi Iwai
@ 2020-05-16 6:28 ` Takashi Iwai
2020-05-16 6:28 ` [PATCH 2/2] ALSA: hda: Unexport some local helper functions Takashi Iwai
1 sibling, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2020-05-16 6:28 UTC (permalink / raw)
To: alsa-devel
The inline function is nowhere used. Drop it.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
include/sound/hda_codec.h | 7 -------
1 file changed, 7 deletions(-)
diff --git a/include/sound/hda_codec.h b/include/sound/hda_codec.h
index 8a32060e3d8d..d16a4229209b 100644
--- a/include/sound/hda_codec.h
+++ b/include/sound/hda_codec.h
@@ -366,13 +366,6 @@ struct hda_verb {
void snd_hda_sequence_write(struct hda_codec *codec,
const struct hda_verb *seq);
-/* unsolicited event */
-static inline void
-snd_hda_queue_unsol_event(struct hda_bus *bus, u32 res, u32 res_ex)
-{
- snd_hdac_bus_queue_event(&bus->core, res, res_ex);
-}
-
/* cached write */
static inline int
snd_hda_codec_write_cache(struct hda_codec *codec, hda_nid_t nid,
--
2.16.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] ALSA: hda: Unexport some local helper functions
2020-05-16 6:28 [PATCH 0/2] ALSA: hda: Cleanup helpers Takashi Iwai
2020-05-16 6:28 ` [PATCH 1/2] ALSA: hda: Drop unused snd_hda_queue_unsol_event() Takashi Iwai
@ 2020-05-16 6:28 ` Takashi Iwai
1 sibling, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2020-05-16 6:28 UTC (permalink / raw)
To: alsa-devel
snd_hdac_bus_queue_event() and snd_hdac_bus_exec_verb() are used only
internally in HD-audio core. Let's drop the exports and move the
declarations into local.h.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
include/sound/hdaudio.h | 3 ---
sound/hda/hdac_bus.c | 2 --
sound/hda/hdac_controller.c | 1 +
sound/hda/local.h | 3 +++
4 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/include/sound/hdaudio.h b/include/sound/hdaudio.h
index 10945963d727..c1f78d9a6e47 100644
--- a/include/sound/hdaudio.h
+++ b/include/sound/hdaudio.h
@@ -372,11 +372,8 @@ struct hdac_bus {
int snd_hdac_bus_init(struct hdac_bus *bus, struct device *dev,
const struct hdac_bus_ops *ops);
void snd_hdac_bus_exit(struct hdac_bus *bus);
-int snd_hdac_bus_exec_verb(struct hdac_bus *bus, unsigned int addr,
- unsigned int cmd, unsigned int *res);
int snd_hdac_bus_exec_verb_unlocked(struct hdac_bus *bus, unsigned int addr,
unsigned int cmd, unsigned int *res);
-void snd_hdac_bus_queue_event(struct hdac_bus *bus, u32 res, u32 res_ex);
static inline void snd_hdac_codec_link_up(struct hdac_device *codec)
{
diff --git a/sound/hda/hdac_bus.c b/sound/hda/hdac_bus.c
index dee04792ca86..09ddab5f5cae 100644
--- a/sound/hda/hdac_bus.c
+++ b/sound/hda/hdac_bus.c
@@ -81,7 +81,6 @@ int snd_hdac_bus_exec_verb(struct hdac_bus *bus, unsigned int addr,
mutex_unlock(&bus->cmd_mutex);
return err;
}
-EXPORT_SYMBOL_GPL(snd_hdac_bus_exec_verb);
/**
* snd_hdac_bus_exec_verb_unlocked - unlocked version
@@ -150,7 +149,6 @@ void snd_hdac_bus_queue_event(struct hdac_bus *bus, u32 res, u32 res_ex)
schedule_work(&bus->unsol_work);
}
-EXPORT_SYMBOL_GPL(snd_hdac_bus_queue_event);
/*
* process queued unsolicited events
diff --git a/sound/hda/hdac_controller.c b/sound/hda/hdac_controller.c
index ac15aa357fbd..011b17cc1efa 100644
--- a/sound/hda/hdac_controller.c
+++ b/sound/hda/hdac_controller.c
@@ -9,6 +9,7 @@
#include <sound/core.h>
#include <sound/hdaudio.h>
#include <sound/hda_register.h>
+#include "local.h"
/* clear CORB read pointer properly */
static void azx_clear_corbrp(struct hdac_bus *bus)
diff --git a/sound/hda/local.h b/sound/hda/local.h
index 5b935219352f..896ba142e8bc 100644
--- a/sound/hda/local.h
+++ b/sound/hda/local.h
@@ -36,6 +36,9 @@ void hda_widget_sysfs_exit(struct hdac_device *codec);
int snd_hdac_bus_add_device(struct hdac_bus *bus, struct hdac_device *codec);
void snd_hdac_bus_remove_device(struct hdac_bus *bus,
struct hdac_device *codec);
+void snd_hdac_bus_queue_event(struct hdac_bus *bus, u32 res, u32 res_ex);
+int snd_hdac_bus_exec_verb(struct hdac_bus *bus, unsigned int addr,
+ unsigned int cmd, unsigned int *res);
int snd_hdac_exec_verb(struct hdac_device *codec, unsigned int cmd,
unsigned int flags, unsigned int *res);
--
2.16.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-05-16 6:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-16 6:28 [PATCH 0/2] ALSA: hda: Cleanup helpers Takashi Iwai
2020-05-16 6:28 ` [PATCH 1/2] ALSA: hda: Drop unused snd_hda_queue_unsol_event() Takashi Iwai
2020-05-16 6:28 ` [PATCH 2/2] ALSA: hda: Unexport some local helper functions Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).