Re: [PATCH 4/10] ACPI: register ACPI Fan as generic thermal cooling device

From: Len Brown
Date: Sat Feb 02 2008 - 04:12:48 EST


On Thursday 17 January 2008 02:51, Zhang Rui wrote:
> +#ifdef CONFIG_ACPI_PROCFS
> Â
> Âstatic struct proc_dir_entry *acpi_fan_dir;
> Â
> @@ -167,7 +213,17 @@ static int acpi_fan_remove_fs(struct acp
> Â
> ÂÂÂÂÂÂÂÂreturn 0;
> Â}
> +#else
> +static int acpi_fan_add_fs(struct acpi_device *device)
> +{
> +ÂÂÂÂÂÂÂreturn 0;
> +}
> Â
> +static int acpi_fan_remove_fs(struct acpi_device *device)
> +{
> +ÂÂÂÂÂÂÂreturn 0;
> +}
> +#endif

commit 3c602840528cf1aa835e6e32d76a0a45936b8e4c
Author: Len Brown <len.brown@xxxxxxxxx>
Date: Sat Feb 2 04:05:54 2008 -0500

ACPI: fan: build fix for CONFIG_ACPI_PROCFS=n

drivers/acpi/fan.c:340: error: âacpi_fan_dirâ undeclared (first use in this function)

Signed-off-by: Len Brown <len.brown@xxxxxxxxx>

diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c
index f6e8165..48cb705 100644
--- a/drivers/acpi/fan.c
+++ b/drivers/acpi/fan.c
@@ -337,10 +337,12 @@ static int __init acpi_fan_init(void)
int result = 0;


+#ifdef CONFIG_ACPI_PROCFS
acpi_fan_dir = proc_mkdir(ACPI_FAN_CLASS, acpi_root_dir);
if (!acpi_fan_dir)
return -ENODEV;
acpi_fan_dir->owner = THIS_MODULE;
+#endif

result = acpi_bus_register_driver(&acpi_fan_driver);
if (result < 0) {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/