diff options
author | Keith Packard <keithp@keithp.com> | 2010-02-25 11:35:03 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2010-02-25 12:48:06 -0800 |
commit | fbbadca7e88391e81ab0f470290f5eec36aa9ce7 (patch) | |
tree | 3f30c4b79bc833f2ae6220a24e94471051a8a9d5 /hw/xfree86 | |
parent | 4b55b2cf8a52c39b53bae11cd1bc7314481d4c86 (diff) |
Share enum definition for det_monrec_parameter sync_source
There were two separate enum definitions, one inside
det_monrec_parameter struct and one for a local variable (which was then
stored inside the struct). Sharing a single definition makes the
code more obviously correct while making the compiler happier.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'hw/xfree86')
-rw-r--r-- | hw/xfree86/modes/xf86Crtc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index 9b1ff280b..10ac8182c 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -1495,12 +1495,16 @@ GuessRangeFromModes(MonPtr mon, DisplayModePtr mode) mon->vrefresh[0].lo = 58.0; } +enum det_monrec_source { + sync_config, sync_edid, sync_default +}; + struct det_monrec_parameter { MonRec *mon_rec; int *max_clock; Bool set_hsync; Bool set_vrefresh; - enum { sync_config, sync_edid, sync_default } *sync_source; + enum det_monrec_source *sync_source; }; static void handle_detailed_monrec(struct detailed_monitor_section *det_mon, @@ -1563,7 +1567,7 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY) Bool add_default_modes = TRUE; Bool debug_modes = config->debug_modes || xf86Initialising; - enum { sync_config, sync_edid, sync_default } sync_source = sync_default; + enum det_monrec_source sync_source = sync_default; while (output->probed_modes != NULL) xf86DeleteMode(&output->probed_modes, output->probed_modes); |