[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4816A888.9000802@aknet.ru>
Date: Tue, 29 Apr 2008 08:48:08 +0400
From: Stas Sergeev <stsp@...et.ru>
To: tiwai@...e.de
CC: gregkh@...e.de, Linux kernel <linux-kernel@...r.kernel.org>,
Dmitry Torokhov <dmitry.torokhov@...il.com>
Subject: Re: patch driver-core-warn-about-duplicate-driver-names-on-the-same-bus.patch
added to gregkh-2.6 tree
Hello.
gregkh@...e.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@...et.ru Sat Apr 26 08:52:51 2008
> From: Stas Sergeev <stsp@...et.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@...ux-foundation.org>
> Cc: Greg KH <greg@...ah.com>, Takashi Iwai <tiwai@...e.de>
> Message-ID: <48134FC3.6040002@...et.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@...et.ru>
> Signed-off-by: Greg Kroah-Hartman <gregkh@...e.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@...et.ru are
>
> driver-core/driver-core-warn-about-duplicate-driver-names-on-the-same-bus.patch
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists