forked from luck/tmp_suning_uos_patched
ALSA: Constify snd_timer_hardware definitions
Most of snd_timer_hardware definitions do simply copying to another struct as-is. Mark them as const for further optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-22-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
df76996a2c
commit
5ff16a3d48
|
@ -214,7 +214,7 @@ static int snd_opl3_timer2_stop(struct snd_timer * timer)
|
|||
|
||||
*/
|
||||
|
||||
static struct snd_timer_hardware snd_opl3_timer1 =
|
||||
static const struct snd_timer_hardware snd_opl3_timer1 =
|
||||
{
|
||||
.flags = SNDRV_TIMER_HW_STOP,
|
||||
.resolution = 80000,
|
||||
|
@ -223,7 +223,7 @@ static struct snd_timer_hardware snd_opl3_timer1 =
|
|||
.stop = snd_opl3_timer1_stop,
|
||||
};
|
||||
|
||||
static struct snd_timer_hardware snd_opl3_timer2 =
|
||||
static const struct snd_timer_hardware snd_opl3_timer2 =
|
||||
{
|
||||
.flags = SNDRV_TIMER_HW_STOP,
|
||||
.resolution = 320000,
|
||||
|
|
|
@ -108,7 +108,7 @@ static void snd_gf1_interrupt_timer2(struct snd_gus_card * gus)
|
|||
|
||||
*/
|
||||
|
||||
static struct snd_timer_hardware snd_gf1_timer1 =
|
||||
static const struct snd_timer_hardware snd_gf1_timer1 =
|
||||
{
|
||||
.flags = SNDRV_TIMER_HW_STOP,
|
||||
.resolution = 80000,
|
||||
|
@ -117,7 +117,7 @@ static struct snd_timer_hardware snd_gf1_timer1 =
|
|||
.stop = snd_gf1_timer1_stop,
|
||||
};
|
||||
|
||||
static struct snd_timer_hardware snd_gf1_timer2 =
|
||||
static const struct snd_timer_hardware snd_gf1_timer2 =
|
||||
{
|
||||
.flags = SNDRV_TIMER_HW_STOP,
|
||||
.resolution = 320000,
|
||||
|
|
|
@ -961,7 +961,7 @@ static int snd_wss_timer_close(struct snd_timer *timer)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static struct snd_timer_hardware snd_wss_timer_table =
|
||||
static const struct snd_timer_hardware snd_wss_timer_table =
|
||||
{
|
||||
.flags = SNDRV_TIMER_HW_AUTO,
|
||||
.resolution = 9945,
|
||||
|
|
|
@ -52,7 +52,7 @@ static int snd_emu10k1_timer_precise_resolution(struct snd_timer *timer,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static struct snd_timer_hardware snd_emu10k1_timer_hw = {
|
||||
static const struct snd_timer_hardware snd_emu10k1_timer_hw = {
|
||||
.flags = SNDRV_TIMER_HW_AUTO,
|
||||
.resolution = 20833, /* 1 sample @ 48KHZ = 20.833...us */
|
||||
.ticks = 1024,
|
||||
|
|
|
@ -1908,7 +1908,7 @@ static int snd_ymfpci_timer_precise_resolution(struct snd_timer *timer,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static struct snd_timer_hardware snd_ymfpci_timer_hw = {
|
||||
static const struct snd_timer_hardware snd_ymfpci_timer_hw = {
|
||||
.flags = SNDRV_TIMER_HW_AUTO,
|
||||
.resolution = 10417, /* 1 / 96 kHz = 10.41666...us */
|
||||
.ticks = 0x10000,
|
||||
|
|
|
@ -869,7 +869,7 @@ static int snd_cs4231_timer_close(struct snd_timer *timer)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static struct snd_timer_hardware snd_cs4231_timer_table = {
|
||||
static const struct snd_timer_hardware snd_cs4231_timer_table = {
|
||||
.flags = SNDRV_TIMER_HW_AUTO,
|
||||
.resolution = 9945,
|
||||
.ticks = 65535,
|
||||
|
|
Loading…
Reference in New Issue
Block a user