The branch stable/14 has been updated by christos:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=6f2d6237fe98f6741bfab9284dd0244a35d77011

commit 6f2d6237fe98f6741bfab9284dd0244a35d77011
Author:     Christos Margiolis <chris...@freebsd.org>
AuthorDate: 2024-02-12 11:05:33 +0000
Commit:     Christos Margiolis <chris...@freebsd.org>
CommitDate: 2024-02-26 23:22:31 +0000

    sound: remove snddev_info->inprog and pcm_inprog()
    
    No longer used.
    
    Sponsored by: The FreeBSD Foundation
    MFC after: 2 weeks
    Reviewed by:    markj
    Differential Revision:  https://reviews.freebsd.org/D43737
    
    (cherry picked from commit 883b8ed582eb3e9e98c62c471228ff3c3a25377d)
---
 sys/dev/sound/pcm/sound.c | 17 -----------------
 sys/dev/sound/pcm/sound.h |  2 --
 2 files changed, 19 deletions(-)

diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c
index b23a28d3af08..186e7b194f27 100644
--- a/sys/dev/sound/pcm/sound.c
+++ b/sys/dev/sound/pcm/sound.c
@@ -392,16 +392,6 @@ pcm_chnref(struct pcm_channel *c, int ref)
        return (c->refcount);
 }
 
-int
-pcm_inprog(struct snddev_info *d, int delta)
-{
-       PCM_LOCKASSERT(d);
-
-       d->inprog += delta;
-
-       return (d->inprog);
-}
-
 static void
 pcm_setmaxautovchans(struct snddev_info *d, int num)
 {
@@ -1127,7 +1117,6 @@ pcm_register(device_t dev, void *devinfo, int numplay, 
int numrec)
        d->pvchanformat = 0;
        d->rvchanrate = 0;
        d->rvchanformat = 0;
-       d->inprog = 0;
 
        /*
         * Create clone manager, disabled by default. Cloning will be
@@ -1182,12 +1171,6 @@ pcm_unregister(device_t dev)
 
        d->flags |= SD_F_DETACHING;
 
-       if (d->inprog != 0) {
-               device_printf(dev, "unregister: operation in progress\n");
-               PCM_UNLOCK(d);
-               return (EBUSY);
-       }
-
        PCM_ACQUIRE(d);
        PCM_UNLOCK(d);
 
diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h
index 5b366a62630c..4af56a2c411a 100644
--- a/sys/dev/sound/pcm/sound.h
+++ b/sys/dev/sound/pcm/sound.h
@@ -320,7 +320,6 @@ int pcm_chnalloc(struct snddev_info *d, struct pcm_channel 
**ch, int direction,
     pid_t pid, char *comm, int devunit);
 int pcm_chnrelease(struct pcm_channel *c);
 int pcm_chnref(struct pcm_channel *c, int ref);
-int pcm_inprog(struct snddev_info *d, int delta);
 
 struct pcm_channel *pcm_chn_create(struct snddev_info *d, struct pcm_channel 
*parent, kobj_class_t cls, int dir, int num, void *devinfo);
 int pcm_chn_destroy(struct pcm_channel *ch);
@@ -379,7 +378,6 @@ struct snddev_info {
        struct snd_clone *clones;
        unsigned devcount, playcount, reccount, pvchancount, rvchancount ;
        unsigned flags;
-       int inprog;
        unsigned int bufsz;
        void *devinfo;
        device_t dev;

Reply via email to