Re: Patch: linux-2.5.45/drivers/base/bus.c - new field to consolidate memory allocation in many drivers

From: Greg KH (greg@kroah.com)
Date: Sat Nov 02 2002 - 15:42:58 EST


On Sat, Nov 02, 2002 at 11:29:51AM -0800, Adam J. Richter wrote:
>
> This patch allows device drivers to tell the generic device
> code to handle allocating the per-device blob of memory that is
> normally stored in device.driver_data. It does so by adding a new
> field device_driver.drvdata_size, with the following semantics:

Ugh, have you tried to use this patch in real life with the busses that
use driver_data today? I didn't think so :)

In short, only the driver's individual probe function knows how big of a
data chunk it needs, and that probe function isn't known until probe()
is called. Hm, well ok, match() could set this, but then it would have
to call into the function found by match to get the size. By then it's
just really not worth adding this extra complexity to the code.

So in short, I don't like this, and don't really see where it buys you
anything.

But I did like your pci private data cleanup patch from the other day,
mind if I add that into the next round of pci cleanups I'm going to be
sending to Linus?

thanks,

greg k-h
-
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/



This archive was generated by hypermail 2b29 : Thu Nov 07 2002 - 22:00:27 EST