[PATCH] xfree86: Deprecate the use of xf86PciInfo.h
Tormod Volden
lists.tormod at gmail.com
Thu Nov 3 05:15:57 PDT 2011
On Mon, Oct 31, 2011 at 4:45 AM, Jeremy Huddleston <jeremyhu at apple.com> wrote:
> Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
> ---
> hw/xfree86/common/xf86PciInfo.h | 2 ++
> hw/xfree86/common/xf86pciBus.c | 3 +++
> hw/xfree86/doc/ddxDesign.xml | 7 -------
> hw/xfree86/fbdevhw/fbdevhw.c | 1 -
> hw/xfree86/os-support/bus/Pci.h | 1 -
> hw/xfree86/sdksyms.sh | 1 -
> 6 files changed, 5 insertions(+), 10 deletions(-)
>
> diff --git a/hw/xfree86/common/xf86PciInfo.h b/hw/xfree86/common/xf86PciInfo.h
> index 356c7db..e2d7862 100644
> --- a/hw/xfree86/common/xf86PciInfo.h
> +++ b/hw/xfree86/common/xf86PciInfo.h
> @@ -47,6 +47,8 @@
> #ifndef _XF86_PCIINFO_H
> #define _XF86_PCIINFO_H
>
> +#warning "xf86PciInfo.h is deprecated. For greater compatibility, drivers should include necessary PCI IDs locally rather than relying on this file from xorg-server."
> +
> /* PCI Pseudo Vendor */
> #define PCI_VENDOR_GENERIC 0x00FF
>
> diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
> index bc09bd2..5c297d6 100644
> --- a/hw/xfree86/common/xf86pciBus.c
> +++ b/hw/xfree86/common/xf86pciBus.c
> @@ -49,6 +49,9 @@
> #define XF86_OS_PRIVS
> #include "xf86_OSproc.h"
>
> +#ifndef PCI_VENDOR_GENERIC
> +#define PCI_VENDOR_GENERIC 0x00FF
> +#endif
Do you have to #ifndef this? Do some preprocessors complain if it is
redefined with the same value? Otherwise I don't see the reason to
allow overriding this definition. We probably need to fix it if it is
defined differently somewhere else, so the warning/error would be
beneficial.
Other than that, looks good to me:
Reviewed-by: Tormod Volden <debian.tormod at gmail.com>
Tormod
>
> /* Bus-specific globals */
> Bool pciSlotClaimed = FALSE;
> diff --git a/hw/xfree86/doc/ddxDesign.xml b/hw/xfree86/doc/ddxDesign.xml
> index 0d5e952..c406cd7 100644
> --- a/hw/xfree86/doc/ddxDesign.xml
> +++ b/hw/xfree86/doc/ddxDesign.xml
> @@ -3553,13 +3553,6 @@ The following include files are typically required by video drivers:
> </para>
>
> <para>
> - Drivers that need to access PCI vendor/device definitions need this:
> - <literallayout><filename>
> - "xf86PciInfo.h"
> - </filename></literallayout>
> - </para>
> -
> - <para>
> Drivers that need to access the PCI config space need this:
> <literallayout><filename>
> "xf86Pci.h"
> diff --git a/hw/xfree86/fbdevhw/fbdevhw.c b/hw/xfree86/fbdevhw/fbdevhw.c
> index dee731b..30a2a91 100644
> --- a/hw/xfree86/fbdevhw/fbdevhw.c
> +++ b/hw/xfree86/fbdevhw/fbdevhw.c
> @@ -9,7 +9,6 @@
> #include "xf86_OSproc.h"
>
> /* pci stuff */
> -#include "xf86PciInfo.h"
> #include "xf86Pci.h"
>
> #include "xf86cmap.h"
> diff --git a/hw/xfree86/os-support/bus/Pci.h b/hw/xfree86/os-support/bus/Pci.h
> index 88560ec..5709bd8 100644
> --- a/hw/xfree86/os-support/bus/Pci.h
> +++ b/hw/xfree86/os-support/bus/Pci.h
> @@ -108,7 +108,6 @@
> #define _PCI_H 1
>
> #include "xf86Pci.h"
> -#include "xf86PciInfo.h"
>
> /*
> * Global Definitions
> diff --git a/hw/xfree86/sdksyms.sh b/hw/xfree86/sdksyms.sh
> index b8e7023..4a4e1f6 100755
> --- a/hw/xfree86/sdksyms.sh
> +++ b/hw/xfree86/sdksyms.sh
> @@ -121,7 +121,6 @@ cat > sdksyms.c << EOF
> #include "xf86Module.h"
> #include "xf86Opt.h"
> #ifdef XSERVER_LIBPCIACCESS
> - #include "xf86PciInfo.h"
> #include "xf86VGAarbiter.h"
> #endif
> #include "xf86Priv.h"
> --
> 1.7.7
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
>
More information about the xorg-devel
mailing list