Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ALSA: virtio: use snd_kcontrol_chip()

We can use snd_kcontrol_chip(). Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/87r011audg.wl-kuninori.morimoto.gx@renesas.com

authored by

Kuninori Morimoto and committed by
Takashi Iwai
792f318e a6e8ecb2

+4 -4
+4 -4
sound/virtio/virtio_kctl.c
··· 47 47 static int virtsnd_kctl_info(struct snd_kcontrol *kcontrol, 48 48 struct snd_ctl_elem_info *uinfo) 49 49 { 50 - struct virtio_snd *snd = kcontrol->private_data; 50 + struct virtio_snd *snd = snd_kcontrol_chip(kcontrol); 51 51 struct virtio_kctl *kctl = &snd->kctls[kcontrol->private_value]; 52 52 struct virtio_snd_ctl_info *kinfo = 53 53 &snd->kctl_infos[kcontrol->private_value]; ··· 102 102 static int virtsnd_kctl_get(struct snd_kcontrol *kcontrol, 103 103 struct snd_ctl_elem_value *uvalue) 104 104 { 105 - struct virtio_snd *snd = kcontrol->private_data; 105 + struct virtio_snd *snd = snd_kcontrol_chip(kcontrol); 106 106 struct virtio_snd_ctl_info *kinfo = 107 107 &snd->kctl_infos[kcontrol->private_value]; 108 108 unsigned int type = le32_to_cpu(kinfo->type); ··· 175 175 static int virtsnd_kctl_put(struct snd_kcontrol *kcontrol, 176 176 struct snd_ctl_elem_value *uvalue) 177 177 { 178 - struct virtio_snd *snd = kcontrol->private_data; 178 + struct virtio_snd *snd = snd_kcontrol_chip(kcontrol); 179 179 struct virtio_snd_ctl_info *kinfo = 180 180 &snd->kctl_infos[kcontrol->private_value]; 181 181 unsigned int type = le32_to_cpu(kinfo->type); ··· 239 239 static int virtsnd_kctl_tlv_op(struct snd_kcontrol *kcontrol, int op_flag, 240 240 unsigned int size, unsigned int __user *utlv) 241 241 { 242 - struct virtio_snd *snd = kcontrol->private_data; 242 + struct virtio_snd *snd = snd_kcontrol_chip(kcontrol); 243 243 struct virtio_snd_msg *msg; 244 244 struct virtio_snd_ctl_hdr *hdr; 245 245 unsigned int *tlv;