diff options
author | Dave Airlie <airlied@redhat.com> | 2012-06-06 11:24:31 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-06-06 11:24:31 +0100 |
commit | 430b956b49b6c883189074ce13bc234545b714e0 (patch) | |
tree | 3b103fc3cad37dff98cb37b903faf4617d574619 | |
parent | a2714fb09e1e0badbb3e98e24d4b1ed92003bdb9 (diff) |
savage: i2c drop xf86Screens usage.
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | src/savage_i2c.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/savage_i2c.c b/src/savage_i2c.c index b5739a2..a37fc7f 100644 --- a/src/savage_i2c.c +++ b/src/savage_i2c.c @@ -37,7 +37,11 @@ in this Software without prior written authorization from the XFree86 Project. static void SavageI2CPutBits(I2CBusPtr b, int clock, int data) { +#ifdef XF86_SCRN_INTERFACE + ScrnInfoPtr pScrn = b->pScrn; +#else ScrnInfoPtr pScrn = (ScrnInfoPtr)(xf86Screens[b->scrnIndex]); +#endif SavagePtr psav = SAVPTR(pScrn); unsigned char reg = 0x10; @@ -51,7 +55,11 @@ SavageI2CPutBits(I2CBusPtr b, int clock, int data) static void SavageI2CGetBits(I2CBusPtr b, int *clock, int *data) { +#ifdef XF86_SCRN_INTERFACE + ScrnInfoPtr pScrn = b->pScrn; +#else ScrnInfoPtr pScrn = (ScrnInfoPtr)(xf86Screens[b->scrnIndex]); +#endif SavagePtr psav = SAVPTR(pScrn); unsigned char reg = 0x10; @@ -76,6 +84,9 @@ SavageI2CInit(ScrnInfoPtr pScrn) I2CPtr->BusName = "I2C bus"; I2CPtr->scrnIndex = pScrn->scrnIndex; +#ifdef XF86_SCRN_INTERFACE + I2CPtr->pScrn = pScrn; +#endif I2CPtr->I2CPutBits = SavageI2CPutBits; I2CPtr->I2CGetBits = SavageI2CGetBits; |