Skip to content

Commit ac1cc6b

Browse files
joshtriplettrafaeljw
authored andcommitted
ACPI: button: move HIDs to acpi/button.h
This makes it possible to use ACPI_BUTTON_HID_POWER in another driver. Signed-off-by: Josh Triplett <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent bb6d3fb commit ac1cc6b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

drivers/acpi/button.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,14 @@
3030
#define ACPI_BUTTON_NOTIFY_STATUS 0x80
3131

3232
#define ACPI_BUTTON_SUBCLASS_POWER "power"
33-
#define ACPI_BUTTON_HID_POWER "PNP0C0C"
3433
#define ACPI_BUTTON_DEVICE_NAME_POWER "Power Button"
3534
#define ACPI_BUTTON_TYPE_POWER 0x01
3635

3736
#define ACPI_BUTTON_SUBCLASS_SLEEP "sleep"
38-
#define ACPI_BUTTON_HID_SLEEP "PNP0C0E"
3937
#define ACPI_BUTTON_DEVICE_NAME_SLEEP "Sleep Button"
4038
#define ACPI_BUTTON_TYPE_SLEEP 0x03
4139

4240
#define ACPI_BUTTON_SUBCLASS_LID "lid"
43-
#define ACPI_BUTTON_HID_LID "PNP0C0D"
4441
#define ACPI_BUTTON_DEVICE_NAME_LID "Lid Switch"
4542
#define ACPI_BUTTON_TYPE_LID 0x05
4643

include/acpi/button.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
#ifndef ACPI_BUTTON_H
33
#define ACPI_BUTTON_H
44

5+
#define ACPI_BUTTON_HID_POWER "PNP0C0C"
6+
#define ACPI_BUTTON_HID_LID "PNP0C0D"
7+
#define ACPI_BUTTON_HID_SLEEP "PNP0C0E"
8+
59
#if IS_ENABLED(CONFIG_ACPI_BUTTON)
610
extern int acpi_lid_open(void);
711
#else

0 commit comments

Comments
 (0)