From: Dmitry Torokhov <dtor_core@ameritech.net>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Greg KH <greg@kroah.com>, Patrick Mochel <mochel@osdl.org>
Subject: Driver core change request
Date: Wed, 6 Oct 2004 23:54:18 -0500 [thread overview]
Message-ID: <200410062354.18885.dtor_core@ameritech.net> (raw)
Hi,
I am reworking my sysfs serio patches (trying to get dynamic psmouse
protocol switching) and I am wondering if we could export device_attach
function. Serio system allows user to request device rescan - force current
driver to let go off the device and find another suitable driver. Also user
can manually request device to be disconnected/connected to a driver. By
having device_attach exported I could get rid of some duplicated code.
Also serio allows user to request a specific driver to be bound to a device
in case there are several options (psmouse/serio_raw for example). To do
that and not poke in the driver core guts too much I need something like the
following:
int driver_probe_device(struct device_driver *dev, struct device *dev)
{
int error;
dev->driver = drv;
if (drv->probe) {
if ((error = drv->probe(dev))) {
dev->driver = NULL;
return error;
}
}
device_bind_driver(dev);
return 0;
}
static int bus_match(struct device * dev, struct device_driver * drv)
{
if (dev->bus->match(dev, drv))
return driver_probe_device(drv, dev);
return -ENODEV;
}
I.e driver_probe_device is exported. Does it have a chance to be accepted?
Thanks!
--
Dmitry
next reply other threads:[~2004-10-07 4:54 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-07 4:54 Dmitry Torokhov [this message]
2004-10-07 21:40 ` Driver core change request Greg KH
2004-10-08 2:59 ` Dmitry Torokhov
2004-10-08 21:48 ` Greg KH
2004-10-12 6:29 ` Dmitry Torokhov
2004-10-12 6:31 ` [PATCH 1/4] Driver core: export device_attach Dmitry Torokhov
2004-10-12 6:31 ` [PATCH 2/4] Driver core: add driver_probe_device Dmitry Torokhov
2004-10-12 6:32 ` [PATCH 3/4] Driver core: add "driver" default attribute Dmitry Torokhov
2004-10-12 6:33 ` [PATCH 4/4] Driver core: add "bind_mode" " Dmitry Torokhov
2004-10-29 16:37 ` [PATCH 2/4] Driver core: add driver_probe_device Greg KH
2004-10-29 18:24 ` Dmitry Torokhov
2004-10-29 18:32 ` Greg KH
2004-10-29 16:37 ` [PATCH 1/4] Driver core: export device_attach Greg KH
2004-10-21 7:05 ` Driver core change request Dmitry Torokhov
2004-10-21 14:50 ` Greg KH
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=200410062354.18885.dtor_core@ameritech.net \
--to=dtor_core@ameritech.net \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mochel@osdl.org \
/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.