[PATCH] generic check_legacy_ioport

Benjamin Herrenschmidt benh at kernel.crashing.org
Tue Apr 24 10:53:20 EST 2007


On Mon, 2007-04-23 at 10:15 +0200, Olaf Hering wrote:
> check_legacy_ioport makes only sense on PREP, CHRP and pSeries.
> They may have an isa node with PS/2, parport, floppy and serial ports.
> Cell has IPMI, check for that too.
> 
> Remove the check_legacy_ioport call from ppc_md, its not needed anymore.
> Hardware capabilities come from the device-tree.
> 
> Signed-off-by: Olaf Hering <olaf at aepfle.de>

Ok, I like the aproach, but why the heck those ifdef's ? Can't you just
remove them ?

Also, doing ifdef on xxxx_MODULE is always BAD because that means the
module can't be built afterward.

> +	if (np) {
> +		of_node_put(np);
>  		return 0;

And also check now if the parent is "isa". Just to be sure. If a
platform won't match that, then it will need it's own
check_legacy_ioport which is fine with me.

To be totally correct, we should -also- check if the port number fits in
the the actual "reg" property but I'm not sure I can be bothered :-)
It's legacy stuff after all...

Cheers,
Ben.





More information about the Linuxppc-dev mailing list