LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File fseidel_fix_newacpidevmanagement.patch of Package pcc-acpi (Project DISCONTINUED:openSUSE:10.3:Update)

---
 pcc_acpi.c |   15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

--- a/pcc_acpi.c
+++ b/pcc_acpi.c
@@ -168,7 +168,6 @@ MODULE_LICENSE("GPL");
 #define METHOD_HKEY_SQTY	"SQTY"
 #define METHOD_HKEY_SINF	"SINF"
 #define METHOD_HKEY_SSET	"SSET"
-#define HKEY_HID		"MAT0012,MAT0013,MAT0018,MAT0019"
 #define HKEY_NOTIFY		 0x80
 
 /* for brightness control */
@@ -212,13 +211,21 @@ enum SINF_BITS { SINF_NUM_BATTERIES = 0,
 
 static int acpi_pcc_hotkey_add(struct acpi_device *device);
 static int acpi_pcc_hotkey_remove(struct acpi_device *device, int type);
-static int acpi_pcc_hotkey_resume(struct acpi_device *device, int state);
+static int acpi_pcc_hotkey_resume(struct acpi_device *device);
 
+static const struct acpi_device_id pcc_device_ids[] = {
+	{"MAT0012", 0},
+	{"MAT0013", 0},
+	{"MAT0018", 0},
+	{"MAT0019", 0},
+	{"", 0},
+};
+MODULE_DEVICE_TABLE(acpi, pcc_device_ids);
 
 static struct acpi_driver acpi_pcc_driver = {
 	.name =		ACPI_PCC_DRIVER_NAME,
 	.class =	ACPI_PCC_CLASS,
-	.ids =		HKEY_HID,
+	.ids =		pcc_device_ids,
 	.ops =		{
 				.add =		acpi_pcc_hotkey_add,
 				.remove =	acpi_pcc_hotkey_remove,
@@ -834,7 +841,7 @@ static int acpi_pcc_init_input(struct ac
                          module init
    -------------------------------------------------------------------------- */
 
-static int acpi_pcc_hotkey_resume(struct acpi_device *device, int state)
+static int acpi_pcc_hotkey_resume(struct acpi_device *device)
 {
 	struct acpi_hotkey *hotkey = acpi_driver_data(device);
 	acpi_status	    status = AE_OK;