diff options
author | Egbert Eich <eich@freedesktop.org> | 2009-10-30 09:44:06 +0100 |
---|---|---|
committer | Egbert Eich <eich@freedesktop.org> | 2009-10-30 09:44:06 +0100 |
commit | 737f25912526fe69878cb01c1d150eda32da5383 (patch) | |
tree | 8eef188c809675172438fa4640ff8357bfb6fe9a | |
parent | 209505b3af2558920578a8572a9930b413380190 (diff) |
Backlight: Some cosmetics to ACPI backlight support.
-rw-r--r-- | src/rhd_acpi.c | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/src/rhd_acpi.c b/src/rhd_acpi.c index 1f2d4d7..971218a 100644 --- a/src/rhd_acpi.c +++ b/src/rhd_acpi.c @@ -2,6 +2,7 @@ * Copyright 2009 Luc Verhaegen <libv@exsuse.de> * Copyright 2009 Matthias Hopf <mhopf@novell.com> * Copyright 2009 Egbert Eich <eich@novell.com> + * Copyright 2009 Jung-uk Kim <jkim@FreeBSD.org> * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -185,6 +186,19 @@ rhdDoBacklight(struct rhdOutput *Output, Bool do_write, int *val) return FALSE; } +#else + +/* + * Stub + */ +static Bool +rhdDoBacklight(struct rhdOutput *Output, Bool do_write, int *val) +{ + if (do_write) + &val = -1; + return FALSE; +} + #endif /* @@ -194,13 +208,12 @@ rhdDoBacklight(struct rhdOutput *Output, Bool do_write, int *val) int RhdACPIGetBacklightControl(struct rhdOutput *Output) { -#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__linux__) int ret; + RHDFUNC(Output); - if (rhdDoBacklight(Output, FALSE, &ret)) - return ret; -#endif - return -1; + + rhdDoBacklight(Output, FALSE, &ret); + return ret; } /* @@ -210,7 +223,6 @@ void RhdACPISetBacklightControl(struct rhdOutput *Output, int val) { RHDFUNC(Output); -#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__linux__) + rhdDoBacklight(Output, TRUE, &val); -#endif } |