Em Ter, 2007-05-29 ?s 16:38 -0400, Michael Krufky escreveu: > As it stands currently, all device-specific data for analog tuner > drivers are stored in the main tuner struct. This is a potential waste > of memory for tuner drivers that do not utilize all of these structures. > > Up until now, as the needs of the drivers have changed, a developer > would issue an RFC to explain what he needs to add to the tuner struct > in order to handle the necessary change for the driver in question. > With these private structures moved out of the main tuner struct, such > changes in the future would only affect the specific tuner driver. > > I have written a driver for the Philips / NXP TDA18271 silicon tuner. > This driver needs to maintain a snapshot of the register values in > memory -- this would be a waste of space for the other tuner drivers, as > this space would only be needed for the tda18271. Since this memory is > only needed for the TDA18271, it makes sense that it should be stored in > a private area specific to the TDA18271, only. > > The attached patch allocates these private structures on an as-needed > basis, within the object code for that specific tuner, rather than > globally inside the main tuner structure. This change could also be > considered as a cleanup / overhaul, which brings the tuner.ko module > closer to an object-oriented design. > > Would anybody have any issues with this patch, if it were applied? The patch looks sane and it is really a good idea. Of course, it should be tested on all touched tuners. -- Cheers, Mauro