From 55c4ec0a1ef78481b4d82153c19c20fbf88f1624 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Mon, 5 Jan 2009 11:24:24 +0200 Subject: [PATCH] XFree86: fbdevhw: Add helper function to get fd Most devices need to do custom weird ioctls, so let them know what the fd is. Signed-off-by: Daniel Stone --- hw/xfree86/fbdevhw/fbdevhw.c | 8 ++++++++ hw/xfree86/fbdevhw/fbdevhw.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/hw/xfree86/fbdevhw/fbdevhw.c b/hw/xfree86/fbdevhw/fbdevhw.c index 5269277ef..495d88b90 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); + + return fPtr->fd; +} + /* -------------------------------------------------------------------- */ /* some helpers for printing debug informations */ diff --git a/hw/xfree86/fbdevhw/fbdevhw.h b/hw/xfree86/fbdevhw/fbdevhw.h index 41c3e339a..bc46b9c4f 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);