applesmc - sensors patch missing from 2.6.22-rc2

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

 



I wonder why the attached patch is missing from applesmc (written by
nicolas boichat) without which sensors simply won't work ...

( but these ones has been applied and are rather useless without the
attached one
http://www.mail-archive.com/[email protected]/msg12374.html
http://www.mail-archive.com/[email protected]/msg12371.html )


I am using this for some weeks on 2.6.21 now without problems

$ sensors
applesmc-isa-0300
Adapter: ISA adapter
temp1:       +28°C
temp2:       +40°C
temp3:       +66°C
temp4:       +58°C
temp5:       +65°C
temp6:       +62°C
temp7:       +69°C
temp8:       +49°C
temp9:       +45°C
temp10:      +58°C
temp11:      +40°C
temp12:      +39°C
fan1:     1060 RPM (safe = 1200 RPM, min = 1000 RPM, max = 6000 RPM)
fan2:     1060 RPM (safe = 1200 RPM, min = 1000 RPM, max = 6000 RPM)

Soeren
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.
diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c
index 0c16067..366f4a1 100644
--- a/drivers/hwmon/applesmc.c
+++ b/drivers/hwmon/applesmc.c
@@ -491,6 +491,12 @@ out:
 
 /* Sysfs Files */
 
+static ssize_t applesmc_name_show(struct device *dev,
+				   struct device_attribute *attr, char *buf)
+{
+	return snprintf(buf, PAGE_SIZE, "applesmc\n");
+}
+
 static ssize_t applesmc_position_show(struct device *dev,
 				   struct device_attribute *attr, char *buf)
 {
@@ -913,6 +919,8 @@ static struct led_classdev applesmc_backlight = {
 	.brightness_set		= applesmc_brightness_set,
 };
 
+static DEVICE_ATTR(name, 0444, applesmc_name_show, NULL);
+
 static DEVICE_ATTR(position, 0444, applesmc_position_show, NULL);
 static DEVICE_ATTR(calibrate, 0644,
 			applesmc_calibrate_show, applesmc_calibrate_store);
@@ -1197,6 +1205,8 @@ static int __init applesmc_init(void)
 		goto out_driver;
 	}
 
+	ret = sysfs_create_file(&pdev->dev.kobj, &dev_attr_name.attr);
+
 	/* Create key enumeration sysfs files */
 	ret = sysfs_create_group(&pdev->dev.kobj, &key_enumeration_group);
 	if (ret)

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux