Re: [PATCH] device model: Do a quickcheck for driver binding before doing an expensive check

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Cornelia Huck
Date: Monday, September 15, 2008 - 4:32 am

On Sun, 14 Sep 2008 08:32:06 -0700,
Arjan van de Ven <arjan@infradead.org> wrote:


Hm, you call bus->match twice now; once without dev->sem held and once
with it. For the busses I'm familiar with that shouldn't be a problem,
but are you sure there aren't busses which want dev->sem held?
(Although I think not relying on dev->sem would be the sane thing...)

I've always thought of ->match being a quick check which just looks at
the IDs with ->probe doing the heavier stuff, so this should be
reasonable (if all busses play nicely). But driver_probe_device() still
calls ->match a second time, and device_attach() will thus always call
->match under the lock. Should it be moved out of the lock there as
well?
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] device model: Do a quickcheck for driver bindi ..., Cornelia Huck, (Mon Sep 15, 4:32 am)