From: Takashi Iwai <tiwai@suse.de>
To: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
Cc: Clemens Ladisch <clemens@ladisch.de>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-sound@vger.kernel.org
Subject: Re: [PATCH 5/9] ALSA: opl4: Convert to snd_seq bus probe mechanism
Date: Wed, 03 Dec 2025 14:51:02 +0100 [thread overview]
Message-ID: <87pl8vsmgp.wl-tiwai@suse.de> (raw)
In-Reply-To: <gl22ngzqfqigynqtw7giz4cbyaanx4y4dwr5ltywwlq3wozk7g@oj5l34antqty>
On Wed, 03 Dec 2025 14:46:27 +0100,
Uwe Kleine-König wrote:
>
> hello,
>
> On Tue, Dec 02, 2025 at 01:35:54PM +0100, Uwe Kleine-König wrote:
> > The snd_seq bus got a dedicated probe function. Make use of that. This
> > fixes a runtime warning about the driver needing to be converted to the
> > bus probe method.
> >
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
> > ---
> > sound/drivers/opl4/opl4_seq.c | 10 ++++------
> > 1 file changed, 4 insertions(+), 6 deletions(-)
> >
> > diff --git a/sound/drivers/opl4/opl4_seq.c b/sound/drivers/opl4/opl4_seq.c
> > index 7bb22089a093..043c537be293 100644
> > --- a/sound/drivers/opl4/opl4_seq.c
> > +++ b/sound/drivers/opl4/opl4_seq.c
> > @@ -118,9 +118,8 @@ static void snd_opl4_seq_free_port(void *private_data)
> > snd_midi_channel_free_set(opl4->chset);
> > }
> >
> > -static int snd_opl4_seq_probe(struct device *_dev)
> > +static int snd_opl4_seq_probe(struct snd_seq_device *dev)
> > {
> > - struct snd_seq_device *dev = to_seq_dev(_dev);
> > struct snd_opl4 *opl4;
> > int client;
> > struct snd_seq_port_callback pcallbacks;
> > @@ -175,9 +174,8 @@ static int snd_opl4_seq_probe(struct device *_dev)
> > return 0;
> > }
> >
> > -static int snd_opl4_seq_remove(struct device *_dev)
> > +static int snd_opl4_seq_remove(struct snd_seq_device *dev)
> > {
> > - struct snd_seq_device *dev = to_seq_dev(_dev);
> > struct snd_opl4 *opl4;
> >
> > opl4 = *(struct snd_opl4 **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
>
> There is a build problem that escaped my build testing (on arm64). This
> additionally needs:
>
> diff --git a/sound/drivers/opl4/opl4_seq.c b/sound/drivers/opl4/opl4_seq.c
> index 043c537be293..fd6f15be6109 100644
> --- a/sound/drivers/opl4/opl4_seq.c
> +++ b/sound/drivers/opl4/opl4_seq.c
> @@ -174,19 +174,18 @@ static int snd_opl4_seq_probe(struct snd_seq_device *dev)
> return 0;
> }
>
> -static int snd_opl4_seq_remove(struct snd_seq_device *dev)
> +static void snd_opl4_seq_remove(struct snd_seq_device *dev)
> {
> struct snd_opl4 *opl4;
>
> opl4 = *(struct snd_opl4 **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
> if (!opl4)
> - return -EINVAL;
> + return;
>
> if (opl4->seq_client >= 0) {
> snd_seq_delete_kernel_client(opl4->seq_client);
> opl4->seq_client = -1;
> }
> - return 0;
> }
>
> static struct snd_seq_driver opl4_seq_driver = {
>
> I don't know if it's already applied, please tell me if you want a v2 or
> a proper patch on top of this (or if you even squash this into the
> original commit).
>
> Sorry for the mess
Don't worry, I haven't applied them yet, so feel free to resubmit.
thanks,
Takashi
next prev parent reply other threads:[~2025-12-03 13:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-02 12:35 [PATCH 0/9] ALSA: seq: Use bus specific probe and remove Uwe Kleine-König
2025-12-02 12:35 ` [PATCH 1/9] " Uwe Kleine-König
2025-12-02 12:35 ` [PATCH 2/9] ALSA: seq: midi: Convert to snd_seq bus probe mechanism Uwe Kleine-König
2025-12-02 12:35 ` [PATCH 3/9] ALSA: seq: ump: " Uwe Kleine-König
2025-12-02 12:35 ` [PATCH 4/9] ALSA: opl3: " Uwe Kleine-König
2025-12-02 12:35 ` [PATCH 5/9] ALSA: opl4: " Uwe Kleine-König
2025-12-03 13:46 ` Uwe Kleine-König
2025-12-03 13:51 ` Takashi Iwai [this message]
2025-12-02 12:35 ` [PATCH 6/9] ALSA: sb: " Uwe Kleine-König
2025-12-02 12:35 ` [PATCH 7/9] ALSA: emu10k1: " Uwe Kleine-König
2025-12-02 12:35 ` [PATCH 8/9] ALSA: seq: oss: " Uwe Kleine-König
2025-12-02 12:35 ` [PATCH 9/9] ALSA: seq: Refuse to probe seq drivers with non-bus probe or remove Uwe Kleine-König
2025-12-02 14:17 ` [PATCH 0/9] ALSA: seq: Use bus specific probe and remove Takashi Iwai
2025-12-02 16:12 ` Uwe Kleine-König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pl8vsmgp.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=clemens@ladisch.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
--cc=u.kleine-koenig@baylibre.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.