[xf86-video-trident,2/2] Move IsClearTV function location inside trident_pll.c

Submitted by Kevin Brace on May 11, 2019, 3:41 a.m.

Details

Message ID 20190511034110.6022-3-kevinbrace@gmx.com
State New
Headers show
Series "Minor adjustments to trident_pll.c" ( rev: 1 ) in X.org

Not browsing as part of any series.

Commit Message

Kevin Brace May 11, 2019, 3:41 a.m.
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
---
 src/trident_pll.c | 35 +++++++++++++++++------------------
 1 file changed, 17 insertions(+), 18 deletions(-)

--
2.17.1

Patch hide | download patch | download mbox

diff --git a/src/trident_pll.c b/src/trident_pll.c
index 1301daf..cf32a0a 100644
--- a/src/trident_pll.c
+++ b/src/trident_pll.c
@@ -37,7 +37,23 @@ 
 #include "trident.h"
 #include "trident_regs.h"

-static void IsClearTV(ScrnInfoPtr pScrn);
+
+static void
+IsClearTV(ScrnInfoPtr pScrn)
+{
+    int vgaIOBase = VGAHWPTR(pScrn)->IOBase;
+    TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
+    CARD8 temp;
+
+    if (pTrident->frequency != 0) return;
+
+    OUTB(vgaIOBase + 4, 0xC0);
+    temp = INB(vgaIOBase + 5);
+    if (temp & 0x80)
+        pTrident->frequency = PAL;
+    else
+        pTrident->frequency = NTSC;
+}

 void
 TGUISetClock(ScrnInfoPtr pScrn, int clock, CARD8 *a, CARD8 *b)
@@ -123,23 +139,6 @@  TGUISetClock(ScrnInfoPtr pScrn, int clock, CARD8 *a, CARD8 *b)
                    clock/1000., p, q, r);
 }

-static void
-IsClearTV(ScrnInfoPtr pScrn)
-{
-    int vgaIOBase = VGAHWPTR(pScrn)->IOBase;
-    TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
-    CARD8 temp;
-
-    if (pTrident->frequency != 0) return;
-
-    OUTB(vgaIOBase + 4, 0xC0);
-    temp = INB(vgaIOBase + 5);
-    if (temp & 0x80)
-        pTrident->frequency = PAL;
-    else
-        pTrident->frequency = NTSC;
-}
-
 void
 TridentFindClock(ScrnInfoPtr pScrn, int clock)
 {