On Mon, 2009-01-05 at 11:38 +0200, Daniel Stone wrote: > Most drivers need to do custom weird ioctls, so let them know what the > fd is. > > Signed-off-by: Daniel Stone <[email protected]> > --- > hw/xfree86/fbdevhw/fbdevhw.c | 8 ++++++++ > hw/xfree86/fbdevhw/fbdevhw.h | 2 ++ > 2 files changed, 10 insertions(+), 0 deletions(-) > > diff --git a/hw/xfree86/fbdevhw/fbdevhw.c b/hw/xfree86/fbdevhw/fbdevhw.c > index 5269277..495d88b 100644 > --- a/hw/xfree86/fbdevhw/fbdevhw.c > +++ b/hw/xfree86/fbdevhw/fbdevhw.c > @@ -152,6 +152,14 @@ fbdevHWFreeRec(ScrnInfoPtr pScrn) > FBDEVHWPTRLVAL(pScrn) = NULL; > } > > +int > +fbdevHWGetFD(ScrnInfoPtr pScrn) > +{ > + fbdevHWPtr fPtr = fbdevHWGetRec(pScrn);
fbdevHWGetRec returns a Bool, not a fbdevHWPtr. Should this be 'fbdevHWPtr fPtr = FBDEVHWPTR(pScrn);' instead? > + > + return fPtr->fd; > +} > + > /* -------------------------------------------------------------------- */ > /* some helpers for printing debug informations */ > > diff --git a/hw/xfree86/fbdevhw/fbdevhw.h b/hw/xfree86/fbdevhw/fbdevhw.h > index 41c3e33..bc46b9c 100644 > --- a/hw/xfree86/fbdevhw/fbdevhw.h > +++ b/hw/xfree86/fbdevhw/fbdevhw.h > @@ -16,6 +16,8 @@ > extern _X_EXPORT Bool fbdevHWGetRec(ScrnInfoPtr pScrn); > extern _X_EXPORT void fbdevHWFreeRec(ScrnInfoPtr pScrn); > > +extern _X_EXPORT int fbdevHWGetFD(ScrnInfoPtr pScrn); > + > extern _X_EXPORT Bool fbdevHWProbe(struct pci_device * pPci, char *device, > char **namep); > extern _X_EXPORT Bool fbdevHWInit(ScrnInfoPtr pScrn, struct pci_device * > pPci, char *device); > _______________________________________________ xorg mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/xorg
