Source
14
14
* This program is distributed in the hope that it will be useful, but
15
15
* WITHOUT ANY WARRANTY; without even the implied warranty of
16
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
17
* General Public License for more details.
18
18
*
19
19
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20
20
*/
21
21
22
22
#define pr_fmt(fmt) "ACPI: button: " fmt
23
23
24
+
#include <linux/compiler.h>
24
25
#include <linux/kernel.h>
25
26
#include <linux/module.h>
26
27
#include <linux/init.h>
27
28
#include <linux/types.h>
28
29
#include <linux/proc_fs.h>
29
30
#include <linux/seq_file.h>
30
31
#include <linux/input.h>
31
32
#include <linux/slab.h>
32
33
#include <linux/acpi.h>
33
34
#include <linux/dmi.h>
242
243
if (ret == NOTIFY_DONE || ret == NOTIFY_OK) {
243
244
/*
244
245
* It is also regarded as success if the notifier_chain
245
246
* returns NOTIFY_OK or NOTIFY_DONE.
246
247
*/
247
248
ret = 0;
248
249
}
249
250
return ret;
250
251
}
251
252
252
-
static int acpi_button_state_seq_show(struct seq_file *seq, void *offset)
253
+
static int __maybe_unused acpi_button_state_seq_show(struct seq_file *seq,
254
+
void *offset)
253
255
{
254
256
struct acpi_device *device = seq->private;
255
257
int state;
256
258
257
259
state = acpi_lid_evaluate_state(device);
258
260
seq_printf(seq, "state: %s\n",
259
261
state < 0 ? "unsupported" : (state ? "open" : "closed"));
260
262
return 0;
261
263
}
262
264