Skip to content

Commit

Permalink
ALSA: hda: Unexport a few more stuff
Browse files Browse the repository at this point in the history
Drop EXPORT_SYMBOL*() from a few more stuff in HD-audio core that
aren't used outside.  Particular the unsol event handler can be
staticized now because the recent change removed all external
callers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
tiwai committed Aug 14, 2019
1 parent 53eff75 commit ddf7cb8
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
6 changes: 0 additions & 6 deletions include/sound/hdaudio.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,6 @@ int snd_hdac_codec_modalias(struct hdac_device *hdac, char *buf, size_t size);

int snd_hdac_refresh_widgets(struct hdac_device *codec);

unsigned int snd_hdac_make_cmd(struct hdac_device *codec, hda_nid_t nid,
unsigned int verb, unsigned int parm);
int snd_hdac_exec_verb(struct hdac_device *codec, unsigned int cmd,
unsigned int flags, unsigned int *res);
int snd_hdac_read(struct hdac_device *codec, hda_nid_t nid,
unsigned int verb, unsigned int parm, unsigned int *res);
int _snd_hdac_read_parm(struct hdac_device *codec, hda_nid_t nid, int parm,
Expand Down Expand Up @@ -374,8 +370,6 @@ 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);

void snd_hdac_bus_process_unsol_events(struct work_struct *work);

static inline void snd_hdac_codec_link_up(struct hdac_device *codec)
{
set_bit(codec->addr, &codec->bus->codec_powered);
Expand Down
5 changes: 3 additions & 2 deletions sound/hda/hdac_bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#include "local.h"
#include "trace.h"

static void snd_hdac_bus_process_unsol_events(struct work_struct *work);

static const struct hdac_bus_ops default_ops = {
.command = snd_hdac_bus_send_cmd,
.get_response = snd_hdac_bus_get_response,
Expand Down Expand Up @@ -149,7 +151,7 @@ EXPORT_SYMBOL_GPL(snd_hdac_bus_queue_event);
/*
* process queued unsolicited events
*/
void snd_hdac_bus_process_unsol_events(struct work_struct *work)
static void snd_hdac_bus_process_unsol_events(struct work_struct *work)
{
struct hdac_bus *bus = container_of(work, struct hdac_bus, unsol_work);
struct hdac_device *codec;
Expand All @@ -172,7 +174,6 @@ void snd_hdac_bus_process_unsol_events(struct work_struct *work)
drv->unsol_event(codec, res);
}
}
EXPORT_SYMBOL_GPL(snd_hdac_bus_process_unsol_events);

/**
* snd_hdac_bus_add_device - Add a codec to bus
Expand Down
6 changes: 2 additions & 4 deletions sound/hda/hdac_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ EXPORT_SYMBOL_GPL(snd_hdac_codec_modalias);
*
* Return an encoded command verb or -1 for error.
*/
unsigned int snd_hdac_make_cmd(struct hdac_device *codec, hda_nid_t nid,
unsigned int verb, unsigned int parm)
static unsigned int snd_hdac_make_cmd(struct hdac_device *codec, hda_nid_t nid,
unsigned int verb, unsigned int parm)
{
u32 val, addr;

Expand All @@ -240,7 +240,6 @@ unsigned int snd_hdac_make_cmd(struct hdac_device *codec, hda_nid_t nid,
val |= parm;
return val;
}
EXPORT_SYMBOL_GPL(snd_hdac_make_cmd);

/**
* snd_hdac_exec_verb - execute an encoded verb
Expand All @@ -261,7 +260,6 @@ int snd_hdac_exec_verb(struct hdac_device *codec, unsigned int cmd,
return codec->exec_verb(codec, cmd, flags, res);
return snd_hdac_bus_exec_verb(codec->bus, codec->addr, cmd, res);
}
EXPORT_SYMBOL_GPL(snd_hdac_exec_verb);


/**
Expand Down
1 change: 1 addition & 0 deletions sound/hda/hdac_regmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <sound/core.h>
#include <sound/hdaudio.h>
#include <sound/hda_regmap.h>
#include "local.h"

static int codec_pm_lock(struct hdac_device *codec)
{
Expand Down
3 changes: 3 additions & 0 deletions sound/hda/local.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,7 @@ 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);

int snd_hdac_exec_verb(struct hdac_device *codec, unsigned int cmd,
unsigned int flags, unsigned int *res);

#endif /* __HDAC_LOCAL_H */

0 comments on commit ddf7cb8

Please sign in to comment.