+ acpi-asus_acpi-return-enodev-when-no-device-found.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     ACPI: asus_acpi: return -ENODEV when no device found
has been added to the -mm tree.  Its filename is
     acpi-asus_acpi-return-enodev-when-no-device-found.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: ACPI: asus_acpi: return -ENODEV when no device found
From: Bjorn Helgaas <bjorn.helgaas@xxxxxx>

This driver is for non-hot-pluggable hardware.  Therefore, if the hardware
isn't present, we want to return -ENODEV so a module load will fail.

We previously returned "result" from the acpi_bus_register_driver() call. 
Registering the driver usually succeeds even if no devices are present,
because the ACPI core allows you to load a driver before a device is
hot-added.

Someday the kernel will expose enough information so user-space can tell
what ACPI drivers should be loaded.  But the kernel doesn't do that yet, so
distros have to load this driver always and rely on the -ENODEV causing the
load to fail if the hardware isn't found.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@xxxxxx>
Acked-by: Frank Seidel <fseidel@xxxxxxx>
Cc: Len Brown <lenb@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/acpi/asus_acpi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/acpi/asus_acpi.c~acpi-asus_acpi-return-enodev-when-no-device-found drivers/acpi/asus_acpi.c
--- a/drivers/acpi/asus_acpi.c~acpi-asus_acpi-return-enodev-when-no-device-found
+++ a/drivers/acpi/asus_acpi.c
@@ -1367,7 +1367,7 @@ static int __init asus_acpi_init(void)
 	if (!asus_hotk_found) {
 		acpi_bus_unregister_driver(&asus_hotk_driver);
 		remove_proc_entry(PROC_ASUS, acpi_root_dir);
-		return result;
+		return -ENODEV;
 	}
 
 	return 0;
_

Patches currently in -mm which might be from bjorn.helgaas@xxxxxx are

acpi-asus_acpi-return-enodev-when-no-device-found.patch
2.6-sony_acpi4.patch
serial-trivial-code-flow-simplification.patch
pnp-handle-sysfs-errors.patch
ioremap-balanced-with-iounmap-for-drivers-video-hpfb.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux