git: 8b9e1b628064 - main - sound: Remove *MINOR from midi/

From: Christos Margiolis <christos_at_FreeBSD.org>
Date: Sat, 06 Jul 2024 18:24:09 UTC
The branch main has been updated by christos:

URL: https://cgit.FreeBSD.org/src/commit/?id=8b9e1b628064daba3650d04fa83cf79808877981

commit 8b9e1b628064daba3650d04fa83cf79808877981
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2024-07-06 18:22:36 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2024-07-06 18:22:36 +0000

    sound: Remove *MINOR from midi/
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      2 days
    Differential Revision:  https://reviews.freebsd.org/D45772
---
 sys/dev/sound/midi/midi.c      | 14 ++++----------
 sys/dev/sound/midi/sequencer.c | 12 +++---------
 2 files changed, 7 insertions(+), 19 deletions(-)

diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c
index f31496df025b..66fb67b31e7a 100644
--- a/sys/dev/sound/midi/midi.c
+++ b/sys/dev/sound/midi/midi.c
@@ -73,10 +73,6 @@ MALLOC_DEFINE(M_MIDI, "midi buffers", "Midi data allocation area");
 #define KOBJMETHOD_END	{ NULL, NULL }
 #endif
 
-#define PCMMKMINOR(u, d, c) ((((c) & 0xff) << 16) | (((u) & 0x0f) << 4) | ((d) & 0x0f))
-#define MIDIMKMINOR(u, d, c) PCMMKMINOR(u, d, c)
-
-#define MIDI_DEV_RAW	2
 #define MIDI_DEV_MIDICTL 12
 
 enum midi_states {
@@ -364,9 +360,8 @@ midi_init(kobj_class_t cls, int unit, int channel, void *cookie)
 
 	sx_xunlock(&midistat_lock);
 
-	m->dev = make_dev(&midi_cdevsw,
-	    MIDIMKMINOR(unit, MIDI_DEV_RAW, channel),
-	    UID_ROOT, GID_WHEEL, 0666, "midi%d.%d", unit, channel);
+	m->dev = make_dev(&midi_cdevsw, unit, UID_ROOT, GID_WHEEL, 0666,
+	    "midi%d.%d", unit, channel);
 	m->dev->si_drv1 = m;
 
 	return m;
@@ -1387,9 +1382,8 @@ midi_load(void)
 	sx_init(&midistat_lock, "midistat lock");
 	TAILQ_INIT(&midi_devs);
 
-	midistat_dev = make_dev(&midistat_cdevsw,
-	    MIDIMKMINOR(0, MIDI_DEV_MIDICTL, 0),
-	    UID_ROOT, GID_WHEEL, 0666, "midistat");
+	midistat_dev = make_dev(&midistat_cdevsw, MIDI_DEV_MIDICTL, UID_ROOT,
+	    GID_WHEEL, 0666, "midistat");
 
 	return 0;
 }
diff --git a/sys/dev/sound/midi/sequencer.c b/sys/dev/sound/midi/sequencer.c
index 68b06a4f4ca4..01f9d0b4809b 100644
--- a/sys/dev/sound/midi/sequencer.c
+++ b/sys/dev/sound/midi/sequencer.c
@@ -91,10 +91,6 @@
 #define LOOKUP_OPEN	(1)
 #define LOOKUP_CLOSE	(2)
 
-#define PCMMKMINOR(u, d, c) \
-	    ((((c) & 0xff) << 16) | (((u) & 0x0f) << 4) | ((d) & 0x0f))
-#define MIDIMKMINOR(u, d, c) PCMMKMINOR(u, d, c)
-#define MIDIUNIT(y) ((dev2unit(y) >> 4) & 0x0f)
 #define MIDIDEV(y) (dev2unit(y) & 0x0f)
 
 /* These are the entries to the sequencer driver. */
@@ -567,12 +563,10 @@ seq_addunit(void)
 	if (scp->mapper == NULL)
 		goto err;
 
-	scp->seqdev = make_dev(&seq_cdevsw,
-	    MIDIMKMINOR(scp->unit, SND_DEV_SEQ, 0), UID_ROOT,
-	    GID_WHEEL, 0666, "sequencer%d", scp->unit);
+	scp->seqdev = make_dev(&seq_cdevsw, SND_DEV_SEQ, UID_ROOT, GID_WHEEL,
+	    0666, "sequencer%d", scp->unit);
 
-	scp->musicdev = make_dev(&seq_cdevsw,
-	    MIDIMKMINOR(scp->unit, SND_DEV_MUSIC, 0), UID_ROOT,
+	scp->musicdev = make_dev(&seq_cdevsw, SND_DEV_MUSIC, UID_ROOT,
 	    GID_WHEEL, 0666, "music%d", scp->unit);
 
 	if (scp->seqdev == NULL || scp->musicdev == NULL)