Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 31cef707 authored by Clemens Ladisch's avatar Clemens Ladisch Committed by Takashi Iwai
Browse files

control: remove snd_konctrol_volatile::owner_pid field



We do not need to save the ID of the process that locked a control
because that information is already available in the owner's file data.

Signed-off-by: default avatarClemens Ladisch <clemens@ladisch.de>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent b419148e
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -56,7 +56,6 @@ struct snd_kcontrol_new {

struct snd_kcontrol_volatile {
	struct snd_ctl_file *owner;	/* locked */
	pid_t owner_pid;
	unsigned int access;	/* access rights */
};

+1 −3
Original line number Diff line number Diff line
@@ -672,7 +672,7 @@ static int snd_ctl_elem_info(struct snd_ctl_file *ctl,
			info->access |= SNDRV_CTL_ELEM_ACCESS_LOCK;
			if (vd->owner == ctl)
				info->access |= SNDRV_CTL_ELEM_ACCESS_OWNER;
			info->owner = vd->owner_pid;
			info->owner = vd->owner->pid;
		} else {
			info->owner = -1;
		}
@@ -827,7 +827,6 @@ static int snd_ctl_elem_lock(struct snd_ctl_file *file,
			result = -EBUSY;
		else {
			vd->owner = file;
			vd->owner_pid = current->pid;
			result = 0;
		}
	}
@@ -858,7 +857,6 @@ static int snd_ctl_elem_unlock(struct snd_ctl_file *file,
			result = -EPERM;
		else {
			vd->owner = NULL;
			vd->owner_pid = 0;
			result = 0;
		}
	}