summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgbert Eich <eich@freedesktop.org>2009-10-30 09:44:06 +0100
committerEgbert Eich <eich@freedesktop.org>2009-10-30 09:44:06 +0100
commit737f25912526fe69878cb01c1d150eda32da5383 (patch)
tree8eef188c809675172438fa4640ff8357bfb6fe9a
parent209505b3af2558920578a8572a9930b413380190 (diff)
Backlight: Some cosmetics to ACPI backlight support.
-rw-r--r--src/rhd_acpi.c26
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
}