Messages in this thread | | | Subject | Re: [linux-usb-devel] [PATCH] limit power budget on spitz | From | Richard Purdie <> | Date | Thu, 08 Jun 2006 22:49:24 +0100 |
| |
On Thu, 2006-06-08 at 14:40 -0700, David Brownell wrote: > Right. OHCI was just an example though ... there are lots of other > platform drivers for PXA. I'm not sure they all check for platform_data > before succeeding in their probe() methods.
The implementations in mainline generally use all the bits or they'd have been fixed by now so its not really a problem. I'm sure Russell would take patches :)
> > The easiest solution might be to move the ohci device registration into > > pxa_set_ohci_info (in pxa27x.c). I gave in and appended a patch (compile > > tested only so far). > > Looked OK to me. > > That's the kind of approach now used with OMAP and AT91, and which IMO > would be appropriate to use for most platform devices ... that is, don't > register devices that the board doesn't have. One additional nuance: if > the kernel doesn't have that driver configured, that's another reason not > to bother registering its device.
This is where you start to add ugly ifdefs and generally start making the code look horrible. The device model separated the drivers and the devices to deal with this issue as I see it. Generally I'd say its cleaner just to let the device register, then if a module comes along at some later point, the device is there for it.
Cheers,
Richard
- 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/
| |