[PATCH 04/11] xfree86: bus: remove superfluous and confused structures in BusRec
Keith Packard
keithp at keithp.com
Fri May 21 07:40:59 PDT 2010
On Fri, 21 May 2010 14:43:17 +0300, Tiago Vignatti <tiago.vignatti at nokia.com> wrote:
> Although API is break, luckily any drivers right now is using such monster.
> diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
> index 485c15a..e5713db 100644
> --- a/hw/xfree86/common/xf86str.h
> +++ b/hw/xfree86/common/xf86str.h
> @@ -355,16 +355,10 @@ typedef enum {
>
> struct pci_device;
>
> -typedef struct {
> - int fbNum;
> -} SbusBusId;
> -
> typedef struct _bus {
> BusType type;
> - union {
> - struct pci_device *pci;
> - SbusBusId sbus;
> - } id;
> + struct pci_device *pci;
> + int sbus;
> } BusRec, *BusPtr;
This doeesn't make sense to me -- a bus is either an SBus or PCI, and so
sticking those alternatives in a union (and nicely tagged at that with
the 'type') is logical, even if it does add another level of naming to
accessing the elements.
--
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100521/8e1514c8/attachment.pgp>
More information about the xorg-devel
mailing list