Skip to contentSkip to conversation

driver core: add driver_find to find a driver by name

PARCH Dmitry Torokhov 1 participant 1 message Jun 28, 2004

lore
Share & tools
lore
#0 lore raw
Quoted 5 lines · Christoph Hellwig
Quoted 3 lines · Dmitry Torokhov

Hi,

Here is a patch that adds driver_find() that allows to search for a

driver

Quoted 8 lines
Quoted 1 line

on a bus by it's name. The function is similar to device_find already

present

Quoted 2 lines

in the tree. I need it for my serio sysfs patches where user can re-bind serio port to an alternate driver by echoing driver's name to serio

port's

Quoted 1 line

driver attribute.

It looks like it's missing some refcounting, no?

Actually I think that kset_find_obj is the one that is missing refcounting - device/driver can easily go away on return from this function as well, no?

Anyway, usage in serio should be fine as the whole thing is protected by serio_sem.

--
Dmitry