I recently discovered a small problem in the code that matches devices to
drivers in the way version numbers are handled.

The tests used against version numbers are < and > -- while this doesn't
seem like a problem at first, consider usb-storage where we need to have
one entry for a device up to rev 3.00, and a different entry for devices
rev 3.00 and higher.  The current mechanism means that the first entry must
test against less than 3.00 and the second against greater than 2.99, which
is counter-intuitive at best. 

I'd like to change these to <= and >= -- and yes, I understand what a major
change that is.  The drivers which use the version numbers would have to be
changed, and so would the hotplug scripts.  But I wanted to throw this idea
out there for consideration.  It's certainly much easier to maintain the
code with the <= and >= semantics, since I can give a definate termination
point to my entries.  With these semantics, the above example uses <= 2.99
and >= 3.00 as the test values respectively, which is much clearer.

Matt

-- 
Matthew Dharm                              Home: [EMAIL PROTECTED] 
Maintainer, Linux USB Mass Storage Driver

THEY CASTRATED MY QUAKE BITS! I WANT THEM BACK!!!!
                                        -- Greg
User Friendly, 3/27/1998

PGP signature

Reply via email to