blob: d5b8d260a0d5fe8be91b1adc3ed4ae7e39c47b71 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
/*
* Copyright (C) 2010 Michael Buesch <m@bues.ch>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include "backlight_dummy.h"
#include "util.h"
static int backlight_dummy_max_brightness(struct backlight *b)
{
return 0;
}
static void backlight_dummy_destroy(struct backlight *b)
{
struct backlight_dummy *bd = container_of(b, struct backlight_dummy, backlight);
free(bd);
}
static struct backlight * backlight_dummy_probe(void)
{
struct backlight_dummy *bd;
bd = zalloc(sizeof(*bd));
if (!bd)
return NULL;
backlight_init(&bd->backlight, "dummy");
bd->backlight.max_brightness = backlight_dummy_max_brightness;
bd->backlight.destroy = backlight_dummy_destroy;
return &bd->backlight;
}
BACKLIGHT_PROBE(dummy, backlight_dummy_probe);
|