Re: [PATCH] deprecate pci_module_init

From: Jeff Garzik
Date: Wed Nov 03 2004 - 20:18:08 EST


Greg KH wrote:
In short, pci_module_init() on 2.4 would return the number of pci
devices bound to the device, on 2.6, it just always returns 0 if the
driver was successfully registered, no knowledge of how many devices
bound are ever returned.


Incorrect. pci_register_driver() is the inconsistent one, as I've explained before (months ago).

pci_module_init() always returns 0 or an errno-based value, in 2.4 or 2.6. Thus is it the portable alternative.

Thus, changing drivers -away from- pci_module_init() makes them less portable, for zero apparent gain. It's just a #define symbol at this point, leave it be.

The cost of "#define pci_module_init pci_register_driver" is zero, while the cost and impact of changing tons of drivers to the non-portable variant is non-zero.

Jeff


-
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/