Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2369cc9492a462285f9eec9d2bbfa730cc2ab5ac
Commit:     2369cc9492a462285f9eec9d2bbfa730cc2ab5ac
Parent:     7fd400297978a2cf7a74344fb22020e9479b4f69
Author:     Henrique de Moraes Holschuh <[EMAIL PROTECTED]>
AuthorDate: Sun Sep 23 11:39:07 2007 -0300
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Tue Sep 25 15:22:07 2007 -0400

    ACPI: thinkpad-acpi: duplicate driver attributes to new hwmon pdrv
    
    Thinkpad-acpi has some driver attributes (debug level, sysfs interface
    version, etc) that also belong to the new hwmon driver.  Duplicate them
    there.
    
    Signed-off-by: Henrique de Moraes Holschuh <[EMAIL PROTECTED]>
    Signed-off-by: Len Brown <[EMAIL PROTECTED]>
---
 drivers/misc/thinkpad_acpi.c |    8 +++++++-
 drivers/misc/thinkpad_acpi.h |    1 +
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c
index d5fb93e..81693b4 100644
--- a/drivers/misc/thinkpad_acpi.c
+++ b/drivers/misc/thinkpad_acpi.c
@@ -4803,12 +4803,16 @@ static int __init thinkpad_acpi_module_init(void)
        tp_features.sensors_pdrv_registered = 1;
 
        ret = tpacpi_create_driver_attributes(&tpacpi_pdriver.driver);
+       if (!ret) {
+               tp_features.platform_drv_attrs_registered = 1;
+               ret = 
tpacpi_create_driver_attributes(&tpacpi_hwmon_pdriver.driver);
+       }
        if (ret) {
                printk(IBM_ERR "unable to create sysfs driver attributes\n");
                thinkpad_acpi_module_exit();
                return ret;
        }
-       tp_features.platform_drv_attrs_registered = 1;
+       tp_features.sensors_pdrv_attrs_registered = 1;
 
 
        /* Device initialization */
@@ -4919,6 +4923,8 @@ static void thinkpad_acpi_module_exit(void)
        if (tpacpi_pdev)
                platform_device_unregister(tpacpi_pdev);
 
+       if (tp_features.sensors_pdrv_attrs_registered)
+               tpacpi_remove_driver_attributes(&tpacpi_hwmon_pdriver.driver);
        if (tp_features.platform_drv_attrs_registered)
                tpacpi_remove_driver_attributes(&tpacpi_pdriver.driver);
 
diff --git a/drivers/misc/thinkpad_acpi.h b/drivers/misc/thinkpad_acpi.h
index 791b8ca..c5fdd68 100644
--- a/drivers/misc/thinkpad_acpi.h
+++ b/drivers/misc/thinkpad_acpi.h
@@ -252,6 +252,7 @@ static struct {
        u32 platform_drv_registered:1;
        u32 platform_drv_attrs_registered:1;
        u32 sensors_pdrv_registered:1;
+       u32 sensors_pdrv_attrs_registered:1;
        u32 sensors_pdev_attrs_registered:1;
 } tp_features;
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to