ALSA: intel8x0: More constifications
Apply const prefix to more places: the static tables for PCM definitions, the register tables, etc. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-9-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
@@ -288,7 +288,7 @@ static inline void iaputword(struct intel8x0m *chip, u32 offset, u16 val)
|
||||
/* return the GLOB_STA bit for the corresponding codec */
|
||||
static unsigned int get_ich_codec_bit(struct intel8x0m *chip, unsigned int codec)
|
||||
{
|
||||
static unsigned int codec_bit[3] = {
|
||||
static const unsigned int codec_bit[3] = {
|
||||
ICH_PCR, ICH_SCR, ICH_TCR
|
||||
};
|
||||
if (snd_BUG_ON(codec >= 3))
|
||||
@@ -686,7 +686,7 @@ struct ich_pcm_table {
|
||||
};
|
||||
|
||||
static int snd_intel8x0m_pcm1(struct intel8x0m *chip, int device,
|
||||
struct ich_pcm_table *rec)
|
||||
const struct ich_pcm_table *rec)
|
||||
{
|
||||
struct snd_pcm *pcm;
|
||||
int err;
|
||||
@@ -724,7 +724,7 @@ static int snd_intel8x0m_pcm1(struct intel8x0m *chip, int device,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct ich_pcm_table intel_pcms[] = {
|
||||
static const struct ich_pcm_table intel_pcms[] = {
|
||||
{
|
||||
.suffix = "Modem",
|
||||
.playback_ops = &snd_intel8x0m_playback_ops,
|
||||
@@ -737,7 +737,7 @@ static struct ich_pcm_table intel_pcms[] = {
|
||||
static int snd_intel8x0m_pcm(struct intel8x0m *chip)
|
||||
{
|
||||
int i, tblsize, device, err;
|
||||
struct ich_pcm_table *tbl, *rec;
|
||||
const struct ich_pcm_table *tbl, *rec;
|
||||
|
||||
#if 1
|
||||
tbl = intel_pcms;
|
||||
@@ -1082,11 +1082,11 @@ static int snd_intel8x0m_create(struct snd_card *card,
|
||||
static const struct snd_device_ops ops = {
|
||||
.dev_free = snd_intel8x0m_dev_free,
|
||||
};
|
||||
static struct ich_reg_info intel_regs[2] = {
|
||||
static const struct ich_reg_info intel_regs[2] = {
|
||||
{ ICH_MIINT, 0 },
|
||||
{ ICH_MOINT, 0x10 },
|
||||
};
|
||||
struct ich_reg_info *tbl;
|
||||
const struct ich_reg_info *tbl;
|
||||
|
||||
*r_intel8x0m = NULL;
|
||||
|
||||
|
Fai riferimento in un nuovo problema
Block a user