Skip to content

Commit 4053a41

Browse files
perexgtiwai
authored andcommitted
ALSA: hda/hdmi: change type for the 'assigned' variable
This change converts the assigned value from int type to the bool type to retain consistency with other structure members like 'setup', 'non_pcm' etc. Signed-off-by: Jaroslav Kysela <perex@perex.cz> Link: https://lore.kernel.org/r/20220913070307.3234038-1-perex@perex.cz Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent f4209f6 commit 4053a41

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

sound/pci/hda/patch_hdmi.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ MODULE_PARM_DESC(enable_all_pins, "Forcibly enable all pins");
5353

5454
struct hdmi_spec_per_cvt {
5555
hda_nid_t cvt_nid;
56-
int assigned;
56+
bool assigned; /* the stream has been assigned */
5757
unsigned int channels_min;
5858
unsigned int channels_max;
5959
u32 rates;
@@ -1193,7 +1193,7 @@ static int hdmi_pcm_open_no_pin(struct hda_pcm_stream *hinfo,
11931193
return err;
11941194

11951195
per_cvt = get_cvt(spec, cvt_idx);
1196-
per_cvt->assigned = 1;
1196+
per_cvt->assigned = true;
11971197
hinfo->nid = per_cvt->cvt_nid;
11981198

11991199
pin_cvt_fixup(codec, NULL, per_cvt->cvt_nid);
@@ -1262,7 +1262,7 @@ static int hdmi_pcm_open(struct hda_pcm_stream *hinfo,
12621262

12631263
per_cvt = get_cvt(spec, cvt_idx);
12641264
/* Claim converter */
1265-
per_cvt->assigned = 1;
1265+
per_cvt->assigned = true;
12661266

12671267
set_bit(pcm_idx, &spec->pcm_in_use);
12681268
per_pin = get_pin(spec, pin_idx);
@@ -1296,7 +1296,7 @@ static int hdmi_pcm_open(struct hda_pcm_stream *hinfo,
12961296
snd_hdmi_eld_update_pcm_info(&eld->info, hinfo);
12971297
if (hinfo->channels_min > hinfo->channels_max ||
12981298
!hinfo->rates || !hinfo->formats) {
1299-
per_cvt->assigned = 0;
1299+
per_cvt->assigned = false;
13001300
hinfo->nid = 0;
13011301
snd_hda_spdif_ctls_unassign(codec, pcm_idx);
13021302
err = -ENODEV;
@@ -1755,7 +1755,7 @@ static void silent_stream_enable(struct hda_codec *codec,
17551755
}
17561756

17571757
per_cvt = get_cvt(spec, cvt_idx);
1758-
per_cvt->assigned = 1;
1758+
per_cvt->assigned = true;
17591759
per_pin->cvt_nid = per_cvt->cvt_nid;
17601760
per_pin->silent_stream = true;
17611761

@@ -1815,7 +1815,7 @@ static void silent_stream_disable(struct hda_codec *codec,
18151815
cvt_idx = cvt_nid_to_cvt_index(codec, per_pin->cvt_nid);
18161816
if (cvt_idx >= 0 && cvt_idx < spec->num_cvts) {
18171817
per_cvt = get_cvt(spec, cvt_idx);
1818-
per_cvt->assigned = 0;
1818+
per_cvt->assigned = false;
18191819
}
18201820

18211821
if (spec->silent_stream_type == SILENT_STREAM_I915) {
@@ -2211,7 +2211,7 @@ static int hdmi_pcm_close(struct hda_pcm_stream *hinfo,
22112211
goto unlock;
22122212
}
22132213
per_cvt = get_cvt(spec, cvt_idx);
2214-
per_cvt->assigned = 0;
2214+
per_cvt->assigned = false;
22152215
hinfo->nid = 0;
22162216

22172217
azx_stream(get_azx_dev(substream))->stripe = 0;

0 commit comments

Comments
 (0)