On Fri, 21 May 2010 14:43:17 +0300, Tiago Vignatti <[email protected]> 
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.

-- 
[email protected]

Attachment: pgplw8ia7v3TH.pgp
Description: PGP signature

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to