Revert "ALSA: control: Use deferred fasync helper"
This reverts commit 857ccedcf569665809d351241d22247c6c55887f which is
commit 4a971e84a7ae10a38d875cd2d4e487c8d1682ca3 upstream.
It breaks the Android GKI kernel abi, and is not needed for Android
devices, so revert it for now. If it is needed for this branch, it can
come back later in an ABI-stable way.
Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I2763e9b54b1bd192d05abecb14c54bc4df46ea56
diff --git a/include/sound/control.h b/include/sound/control.h
index 41bd72ff..77d9fa1 100644
--- a/include/sound/control.h
+++ b/include/sound/control.h
@@ -103,7 +103,7 @@
int preferred_subdevice[SND_CTL_SUBDEV_ITEMS];
wait_queue_head_t change_sleep;
spinlock_t read_lock;
- struct snd_fasync *fasync;
+ struct fasync_struct *fasync;
int subscribed; /* read interface is activated */
struct list_head events; /* waiting events for read */
};
diff --git a/sound/core/control.c b/sound/core/control.c
index 732eb51..3b44378 100644
--- a/sound/core/control.c
+++ b/sound/core/control.c
@@ -121,7 +121,6 @@
if (control->vd[idx].owner == ctl)
control->vd[idx].owner = NULL;
up_write(&card->controls_rwsem);
- snd_fasync_free(ctl->fasync);
snd_ctl_empty_read_queue(ctl);
put_pid(ctl->pid);
kfree(ctl);
@@ -176,7 +175,7 @@
_found:
wake_up(&ctl->change_sleep);
spin_unlock(&ctl->read_lock);
- snd_kill_fasync(ctl->fasync, SIGIO, POLL_IN);
+ kill_fasync(&ctl->fasync, SIGIO, POLL_IN);
}
read_unlock_irqrestore(&card->ctl_files_rwlock, flags);
}
@@ -1942,7 +1941,7 @@
struct snd_ctl_file *ctl;
ctl = file->private_data;
- return snd_fasync_helper(fd, file, on, &ctl->fasync);
+ return fasync_helper(fd, file, on, &ctl->fasync);
}
/* return the preferred subdevice number if already assigned;
@@ -2016,7 +2015,7 @@
read_lock_irqsave(&card->ctl_files_rwlock, flags);
list_for_each_entry(ctl, &card->ctl_files, list) {
wake_up(&ctl->change_sleep);
- snd_kill_fasync(ctl->fasync, SIGIO, POLL_ERR);
+ kill_fasync(&ctl->fasync, SIGIO, POLL_ERR);
}
read_unlock_irqrestore(&card->ctl_files_rwlock, flags);