public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC] Changes to the driver model class code.
@ 2005-03-15 17:08 Greg KH
  2005-03-15 17:09 ` Greg KH
                   ` (3 more replies)
  0 siblings, 4 replies; 28+ messages in thread
From: Greg KH @ 2005-03-15 17:08 UTC (permalink / raw)
  To: linux-kernel, linux-usb-devel; +Cc: Kay Sievers

Hi all,

There are 4 patches being posted here in response to this message that
start us on the way toward cleaning up the driver model code so that
it's actually usable by mere kernel developers :)

The main problem with the class code, is that _everyone_ gets it wrong
when trying to use it (and that includes me.)  So, because of that, the
class_simple wrapper was written.  So almost everyone used that.  That
pretty much proved that the class_simple interface was the proper type
of interface for the main class code itself.

Because of that, Kay wrote a first cut at adding the class_simple type
of interface to the class core (he posted it to lkml a month or so ago.)
I've finally taken that code, tweaked it a bit (fixing a module
ownership issue that sprang up due to the class core changes, and
changed the locking model) and added it to my bk-driver tree.  I've also
taken his tty and input patches that convert those subsystems over to
the new functions (it's pretty much a simple search and replace for
existing class_simple users.)

Then I moved the USB host controller code to use this new interface.
That was a bit more complex as it used the struct class and struct
class_device code directly.  As you can see by the patch, the result is
pretty much identical, and actually a bit smaller in the end.

So I'll be slowly converting the kernel over to using this new
interface, and when finished, I can get rid of the old class apis (or
actually, just make them static) so that no one can implement them
improperly again...

Comments?

Oh, I need to go add kernel-doc to the new functions, will do that
next...

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2005-03-27 14:57 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-15 17:08 [RFC] Changes to the driver model class code Greg KH
2005-03-15 17:09 ` Greg KH
2005-03-15 17:10   ` Greg KH
2005-03-15 17:10     ` Greg KH
2005-03-15 17:11       ` Greg KH
2005-03-15 17:47 ` Dmitry Torokhov
2005-03-15 19:34   ` Greg KH
2005-03-15 19:47     ` [linux-usb-devel] " Dmitry Torokhov
2005-03-15 20:15     ` Dominik Brodowski
2005-03-15 22:14       ` Greg KH
2005-03-16  1:01         ` Dominik Brodowski
2005-03-16  3:42         ` Dmitry Torokhov
2005-03-27 14:42         ` Dominik Brodowski
2005-03-15 19:08 ` Dominik Brodowski
2005-03-15 19:30   ` [linux-usb-devel] " Dmitry Torokhov
2005-03-15 19:34   ` Sean
2005-03-15 19:45   ` John Lenz
2005-03-15 19:51   ` Greg KH
2005-03-15 20:06     ` Dominik Brodowski
2005-03-15 20:14     ` [linux-usb-devel] " Dmitry Torokhov
2005-03-15 20:35       ` David Brownell
2005-03-15 20:48         ` Dmitry Torokhov
2005-03-15 21:14           ` David Brownell
2005-03-15 21:23             ` Dominik Brodowski
2005-03-15 22:05             ` Dmitry Torokhov
2005-03-15 22:29               ` David Brownell
2005-03-16 23:16 ` Jon Smirl
2005-03-17  6:17   ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox