Skip to content

Commit d662117

Browse files
committed
ALSA: pcm: Make snd_pcm_hw_constraints_init() and _complete() static
Both snd_pcm_hw_constraints_init() and _complete() functions are called only from pcm_native.c, hence they can be static for further optimization. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 2ba0176 commit d662117

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

sound/core/pcm_local.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ void snd_interval_muldivk(const struct snd_interval *a,
2020
void snd_interval_mulkdiv(const struct snd_interval *a, unsigned int k,
2121
const struct snd_interval *b, struct snd_interval *c);
2222

23-
int snd_pcm_hw_constraints_init(struct snd_pcm_substream *substream);
24-
int snd_pcm_hw_constraints_complete(struct snd_pcm_substream *substream);
25-
2623
int snd_pcm_hw_constraint_mask(struct snd_pcm_runtime *runtime,
2724
snd_pcm_hw_param_t var, u_int32_t mask);
2825

sound/core/pcm_native.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2308,7 +2308,7 @@ static int snd_pcm_hw_rule_buffer_bytes_max(struct snd_pcm_hw_params *params,
23082308
return snd_interval_refine(hw_param_interval(params, rule->var), &t);
23092309
}
23102310

2311-
int snd_pcm_hw_constraints_init(struct snd_pcm_substream *substream)
2311+
static int snd_pcm_hw_constraints_init(struct snd_pcm_substream *substream)
23122312
{
23132313
struct snd_pcm_runtime *runtime = substream->runtime;
23142314
struct snd_pcm_hw_constraints *constrs = &runtime->hw_constraints;
@@ -2432,7 +2432,7 @@ int snd_pcm_hw_constraints_init(struct snd_pcm_substream *substream)
24322432
return 0;
24332433
}
24342434

2435-
int snd_pcm_hw_constraints_complete(struct snd_pcm_substream *substream)
2435+
static int snd_pcm_hw_constraints_complete(struct snd_pcm_substream *substream)
24362436
{
24372437
struct snd_pcm_runtime *runtime = substream->runtime;
24382438
struct snd_pcm_hardware *hw = &runtime->hw;

0 commit comments

Comments
 (0)