lkml.org 
[lkml]   [2003]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Driver API (was Re: Linux GPL and binary module exception clause?)
On Thu, Dec 11, 2003 at 02:47:49PM +0200, Hannu Savolainen wrote:

> In a charcter driver all you need to know from the inode structure is
> basicly just the device (minor) number. It's not hard to implement the
> ABI layer so that the minor number can be provided regardless of the
> changes made to the kernel behind it.

Not good enough (if you want a demonstration, check USB character devices
and the nightmare stuff happening around handling of minor->object mapping
there).

Practically every place that uses minors instead of pointers to real objects
(whatever they are for that subsystem) is fscked as soon as you start dealing
with fun issues like hotplug, etc.

And then there is sysfs fun - my worst nightmare right now is that some
optimist will go ahead and put kobjects into sound/* objects. Then we
are guaranteed several months of massaging the lifetime rules of the
damn things to pure refcounting and doing that in the maze of twisty little
wrappers, all pointless, will be *ugly*. I'm getting more than enough of
that fun with netdev, thank you very much...

No, I don't know what changes will be needed in cdev interfaces; almost
certainly they will depend on subsystem and that's a work for 2.7. But
we will need something and "just use minors" won't do it.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:59    [W:0.094 / U:7.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site