Re: 2.6.10-mm1, class_simple_* and GPL addition

From: Greg KH
Date: Fri Oct 29 2004 - 16:08:16 EST


I've thought about this a bunch recently. A lot of people emailed me
privately about it too. Here's my reasoning as to why I did this:

On Wed, Oct 27, 2004 at 08:12:44PM -0500, Dmitry Torokhov wrote:
> I wonder what are the technical merits of this change. I certainly agree
> with Pat's assertion that the rest of driver model functions should be used
> by in-kernel subsystems (such as PCI, USB, serio etc) only and not exposed
> to the outside world. This will allow freely fix/enhance the core without
> fear of silently breaking external modules.
>
> But class_simple is itself a limited and contained interface with well-
> defined semantic. Which I believe was advertised aat one time as a wrapper
> for the objects wanting to plug into hotplug/udev model but either living
> outside of established subsystems or within subsystem not yet ready to
> implement proper refcounting needed for full-blown sysfs integration.

You are right, class_simple is merely a wrapper around the core class
and class_device functions. It makes it easier for a driver subsystem
to implement a very common feature.

See, "wrapper" is the point here. If we were to have someone try to
submit the class_simple code today, after the driver core had the GPL
function exports on them, we would laugh them out of the room on the
grounds that they were wrapping GPL interfaces with a looser one. So,
because of that, I'm going to mark these functions this way.

As to people saying it's futile to try to get companies to change, I
don't buy that. Go look up the history of the EXPORT_SYMBOL_GPL marker
and see who used it first. I know for a fact that because of this
marking on some kernel functions a very large company totally switched
directions and rethought their policies about Linux kernel
drivers/modules. Now that company has plays very nicely with the Linux
kernel community, and contributes a lot of very good, useful, and needed
code, all under the GPL.

So we can change things, little things like this can help everyone out,
even if I'm going to get a ton of nvidia user hate mail directed to me
after the next kernel comes out...

Remember, binary kernel modules are a leach on our community.

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/