On Wed, Nov 18, 2009 at 2:28 PM, Adam Jackson <[email protected]> wrote: > Signed-off-by: Adam Jackson <[email protected]> > --- > include/pciaccess.h | 14 ++++ > src/Makefile.am | 1 + > src/common_io.c | 95 ++++++++++++++++++++++++ > src/linux_sysfs.c | 184 ++++++++++++++++++++++++++++++++++++---------- > src/pciaccess_private.h | 9 +++ > 5 files changed, 263 insertions(+), 40 deletions(-) > create mode 100644 src/common_io.c > > diff --git a/include/pciaccess.h b/include/pciaccess.h > index 8128656..b4a431a 100644 > --- a/include/pciaccess.h > +++ b/include/pciaccess.h > @@ -1,5 +1,6 @@ > /* > * (C) Copyright IBM Corporation 2006 > + * Copyright 2009 Red Hat, Inc. > * All Rights Reserved. > * > * Permission is hereby granted, free of charge, to any person obtaining a > @@ -507,4 +508,17 @@ int pci_device_vgaarb_unlock (void); > /* return the current device count + resource decodes for the device */ > int pci_device_vgaarb_get_info (struct pci_device *dev, int *vga_count, > int *rsrc_decodes); > > +/* > + * I/O space access. > + */ > +void *pci_device_open_io(struct pci_device *dev, int bar);
I'd make the returned void pointer a struct pci_device_io pointer instead. We don't have to actually define the struct anywhere, and it gives us typesafety and make the API more self-documenting. cheers, Kristian _______________________________________________ xorg-devel mailing list [email protected] http://lists.x.org/mailman/listinfo/xorg-devel
