]> git.sur5r.net Git - groeck-it87/commitdiff
Add 'ignore_resource_conflict' error
authorGuenter Roeck <linux@roeck-us.net>
Wed, 20 Sep 2017 22:19:33 +0000 (15:19 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Wed, 20 Sep 2017 22:19:33 +0000 (15:19 -0700)
It appears that some BIOSes reserve ACPI resources without using them,
and acpi_enable_resources=lax seems to result in failures to load
certain drivers.

Introduce a 'ignore_resource_conflict' module parameter as alternate
means to ignore ACPI resource conflicts.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
it87.c

diff --git a/it87.c b/it87.c
index eae64f38ee1fe8d5927e8fba85efd2a1f7017230..027ede9d63e81e879f05a7e416eab4814883070d 100644 (file)
--- a/it87.c
+++ b/it87.c
@@ -86,6 +86,10 @@ static unsigned short force_id;
 module_param(force_id, ushort, 0);
 MODULE_PARM_DESC(force_id, "Override the detected device ID");
 
+static bool ignore_resource_conflict;
+module_param(ignore_resource_conflict, bool, 0);
+MODULE_PARM_DESC(ignore_resource_conflict, "Ignore ACPI resource conflict");
+
 static struct platform_device *it87_pdev[2];
 
 #define        REG_2E  0x2e    /* The register to read/write */
@@ -3801,8 +3805,10 @@ static int __init it87_device_add(int index, unsigned short address,
        int err;
 
        err = acpi_check_resource_conflict(&res);
-       if (err)
-               return err;
+       if (err) {
+               if (!ignore_resource_conflict)
+                       return err;
+       }
 
        pdev = platform_device_alloc(DRVNAME, address);
        if (!pdev)