Ühel kenal päeval, T, 2009-01-06 kell 00:38, kirjutas Peter Stuge:
Uwe Hermann wrote:
There's a pciconf.h with PCI conf constants - lets actually use it
PCI_CONF_REG_{INDEX,DATA} constants instead of 0xCF8 and 0xCFF everywhere. Not touching YABEL as I'm not sure it would want to include that header.
Signed-off-by: Mart Raudsepp mart.raudsepp@artecdesign.ee
Acked-by: Uwe Hermann uwe@hermann-uwe.de
Please don't commit this. I would rather see the 0xcf8 and cfc defines removed. This is PCI code, these ports will never change for PCI buses, and they are the first thing most learn about PCI programming.
Defines add indirection = complexity = error sources. I'm with Stefan, we should use them carefully.
Hence the sentence "In case it's a good idea to use these constants from that header" in my mail :)
I simply noticed the fact that there are constant defined, and that the same thing is used per value. Lets perhaps fix the inconsistency another way then. Proposed patch attached.
Mart Raudsepp