From: Stas Sergeev <stsp@aknet.ru>
To: tiwai@suse.de
Cc: gregkh@suse.de, Linux kernel <linux-kernel@vger.kernel.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>
Subject: Re: patch driver-core-warn-about-duplicate-driver-names-on-the-same-bus.patch added to gregkh-2.6 tree
Date: Tue, 29 Apr 2008 08:48:08 +0400 [thread overview]
Message-ID: <4816A888.9000802@aknet.ru> (raw)
In-Reply-To: <12094266793898@kroah.org>
Hello.
gregkh@suse.de wrote:
> This is a note to let you know that I've just added the patch titled
> Subject: driver core: warn about duplicate driver names on the same bus
> to my gregkh-2.6 tree. Its filename is
Thanks.
Takashi, do you think this fixes the
pcspkr/snd-pcsp conflict sufficienly
well? I think the Kconfig protection
is no longer needed. For the better
convinience the modprobe rule can be
created that will remove one driver
before inserting another. But this is
optional.
What do you think? Can we now remove
the Kconfig protection?
> driver-core-warn-about-duplicate-driver-names-on-the-same-bus.patch
>
> This tree can be found at
> http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/
>
>
>>From stsp@aknet.ru Sat Apr 26 08:52:51 2008
> From: Stas Sergeev <stsp@aknet.ru>
> Date: Sat, 26 Apr 2008 19:52:35 +0400
> Subject: driver core: warn about duplicate driver names on the same bus
> To: Andrew Morton <akpm@linux-foundation.org>
> Cc: Greg KH <greg@kroah.com>, Takashi Iwai <tiwai@suse.de>
> Message-ID: <48134FC3.6040002@aknet.ru>
>
>
> Currently an attempt to register multiple
> drivers with the same name causes the
> stack trace with some cryptic error message.
> The attached patch adds the necessary check
> and the clear error message.
>
> Signed-off-by: Stas Sergeev <stsp@aknet.ru>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
>
> ---
> drivers/base/driver.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> --- a/drivers/base/driver.c
> +++ b/drivers/base/driver.c
> @@ -217,12 +217,22 @@ static void driver_remove_groups(struct
> int driver_register(struct device_driver *drv)
> {
> int ret;
> + struct device_driver *other;
>
> if ((drv->bus->probe && drv->probe) ||
> (drv->bus->remove && drv->remove) ||
> (drv->bus->shutdown && drv->shutdown))
> printk(KERN_WARNING "Driver '%s' needs updating - please use "
> "bus_type methods\n", drv->name);
> +
> + other = driver_find(drv->name, drv->bus);
> + if (other) {
> + put_driver(other);
> + printk(KERN_ERR "Error: Driver '%s' is already registered, "
> + "aborting...\n", drv->name);
> + return -EEXIST;
> + }
> +
> ret = bus_add_driver(drv);
> if (ret)
> return ret;
>
>
> Patches currently in gregkh-2.6 which might be from stsp@aknet.ru are
>
> driver-core/driver-core-warn-about-duplicate-driver-names-on-the-same-bus.patch
>
next parent reply other threads:[~2008-04-29 4:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <12094266793898@kroah.org>
2008-04-29 4:48 ` Stas Sergeev [this message]
2008-04-29 4:58 ` patch driver-core-warn-about-duplicate-driver-names-on-the-same-bus.patch added to gregkh-2.6 tree Greg KH
2008-04-29 10:41 ` Takashi Iwai
2008-04-29 15:14 ` Greg KH
2008-04-29 16:41 ` Takashi Iwai
2008-04-29 16:56 ` Greg KH
2008-04-29 19:28 ` Stas Sergeev
2008-04-30 6:34 ` Takashi Iwai
2008-04-30 17:45 ` Stas Sergeev
2008-05-02 14:07 ` Takashi Iwai
2008-05-02 15:38 ` Stas Sergeev
2008-05-02 16:00 ` Takashi Iwai
2008-05-02 16:22 ` Stas Sergeev
2008-05-02 16:35 ` Takashi Iwai
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=4816A888.9000802@aknet.ru \
--to=stsp@aknet.ru \
--cc=dmitry.torokhov@gmail.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=tiwai@suse.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox