aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>2007-09-23 10:39:07 -0400
committerLen Brown <len.brown@intel.com>2007-09-25 15:22:07 -0400
commit2369cc9492a462285f9eec9d2bbfa730cc2ab5ac (patch)
tree524c717beda9c2ea9ca39faab5e07f6c2ccc007f
parent7fd400297978a2cf7a74344fb22020e9479b4f69 (diff)
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 <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r--drivers/misc/thinkpad_acpi.c8
-rw-r--r--drivers/misc/thinkpad_acpi.h1
2 files changed, 8 insertions, 1 deletions
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c
index d5fb93ed04f0..81693b4c23b8 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)
4803 tp_features.sensors_pdrv_registered = 1; 4803 tp_features.sensors_pdrv_registered = 1;
4804 4804
4805 ret = tpacpi_create_driver_attributes(&tpacpi_pdriver.driver); 4805 ret = tpacpi_create_driver_attributes(&tpacpi_pdriver.driver);
4806 if (!ret) {
4807 tp_features.platform_drv_attrs_registered = 1;
4808 ret = tpacpi_create_driver_attributes(&tpacpi_hwmon_pdriver.driver);
4809 }
4806 if (ret) { 4810 if (ret) {
4807 printk(IBM_ERR "unable to create sysfs driver attributes\n"); 4811 printk(IBM_ERR "unable to create sysfs driver attributes\n");
4808 thinkpad_acpi_module_exit(); 4812 thinkpad_acpi_module_exit();
4809 return ret; 4813 return ret;
4810 } 4814 }
4811 tp_features.platform_drv_attrs_registered = 1; 4815 tp_features.sensors_pdrv_attrs_registered = 1;
4812 4816
4813 4817
4814 /* Device initialization */ 4818 /* Device initialization */
@@ -4919,6 +4923,8 @@ static void thinkpad_acpi_module_exit(void)
4919 if (tpacpi_pdev) 4923 if (tpacpi_pdev)
4920 platform_device_unregister(tpacpi_pdev); 4924 platform_device_unregister(tpacpi_pdev);
4921 4925
4926 if (tp_features.sensors_pdrv_attrs_registered)
4927 tpacpi_remove_driver_attributes(&tpacpi_hwmon_pdriver.driver);
4922 if (tp_features.platform_drv_attrs_registered) 4928 if (tp_features.platform_drv_attrs_registered)
4923 tpacpi_remove_driver_attributes(&tpacpi_pdriver.driver); 4929 tpacpi_remove_driver_attributes(&tpacpi_pdriver.driver);
4924 4930
diff --git a/drivers/misc/thinkpad_acpi.h b/drivers/misc/thinkpad_acpi.h
index 791b8ca4bca5..c5fdd688cc99 100644
--- a/drivers/misc/thinkpad_acpi.h
+++ b/drivers/misc/thinkpad_acpi.h
@@ -252,6 +252,7 @@ static struct {
252 u32 platform_drv_registered:1; 252 u32 platform_drv_registered:1;
253 u32 platform_drv_attrs_registered:1; 253 u32 platform_drv_attrs_registered:1;
254 u32 sensors_pdrv_registered:1; 254 u32 sensors_pdrv_registered:1;
255 u32 sensors_pdrv_attrs_registered:1;
255 u32 sensors_pdev_attrs_registered:1; 256 u32 sensors_pdev_attrs_registered:1;
256} tp_features; 257} tp_features;
257 258