summaryrefslogtreecommitdiff
path: root/src/sna/sna_driver.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-05-25 08:50:33 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-05-25 10:06:57 +0100
commit8a9a585341e2dd43c649204fcf6d92a867671ba3 (patch)
treef91a521d5906658745633bc9b35c5c0ab4bb2439 /src/sna/sna_driver.c
parente45629135065d0cc73c285f8df35ab4e1d07c6dc (diff)
Only create a single instance of the intel_options array
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_driver.c')
-rw-r--r--src/sna/sna_driver.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c
index fb54a24c..9c6994b2 100644
--- a/src/sna/sna_driver.c
+++ b/src/sna/sna_driver.c
@@ -259,15 +259,8 @@ static Bool sna_get_early_options(ScrnInfoPtr scrn)
{
struct sna *sna = to_sna(scrn);
- /* Process the options */
- xf86CollectOptions(scrn, NULL);
- if (!(sna->Options = malloc(sizeof(intel_options))))
- return FALSE;
-
- memcpy(sna->Options, intel_options, sizeof(intel_options));
- xf86ProcessOptions(scrn->scrnIndex, scrn->options, sna->Options);
-
- return TRUE;
+ sna->Options = intel_options_get(scrn);
+ return sna->Options != NULL;
}
struct sna_device {