summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKevin Brace <kevinbrace@gmx.com>2018-06-16 10:24:35 -0500
committerConnor Behan <connor.behan@gmail.com>2018-06-25 13:30:09 -0400
commitc63eb246927f263b20966a76d80efd9acf9713af (patch)
tree5bcb178f0f71521327ba358b0453e3cd9c29d585 /src
parent5c494ca862257f1ce839febc8eda68a26353e544 (diff)
Convert R128Div to an inline function
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
Diffstat (limited to 'src')
-rw-r--r--src/r128.h6
-rw-r--r--src/r128_driver.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/r128.h b/src/r128.h
index aa98dd0..6142ff8 100644
--- a/src/r128.h
+++ b/src/r128.h
@@ -498,6 +498,12 @@ do { \
info->fifo_slots -= entries; \
} while (0)
+/* Compute n/d with rounding. */
+static inline int R128Div(int n, int d)
+{
+ return (n + (d / 2)) / d;
+}
+
extern R128EntPtr R128EntPriv(ScrnInfoPtr pScrn);
extern void R128WaitForFifoFunction(ScrnInfoPtr pScrn, int entries);
extern void R128WaitForIdle(ScrnInfoPtr pScrn);
diff --git a/src/r128_driver.c b/src/r128_driver.c
index e902d6f..b814c1e 100644
--- a/src/r128_driver.c
+++ b/src/r128_driver.c
@@ -397,12 +397,6 @@ int R128MinBits(int val)
return bits;
}
-/* Compute n/d with rounding. */
-static int R128Div(int n, int d)
-{
- return (n + (d / 2)) / d;
-}
-
/* Finds the first output using a given crtc. */
xf86OutputPtr R128FirstOutput(xf86CrtcPtr crtc)
{