From eee5fa2a378eb5385943113120011e651ecbc288 Mon Sep 17 00:00:00 2001 From: Nicolas Boichat Date: Wed, 23 May 2007 13:58:13 -0700 Subject: [PATCH] --- yaml --- r: 56914 b: refs/heads/master c: fa74419bb7b51af4bbb66116d14cc92f0b5aff25 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/hwmon/applesmc.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index a2ab23e10106..cd2431c8dbbf 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ae2d990eede0ef5938c210d48a177c044258ecd8 +refs/heads/master: fa74419bb7b51af4bbb66116d14cc92f0b5aff25 diff --git a/trunk/drivers/hwmon/applesmc.c b/trunk/drivers/hwmon/applesmc.c index 0c160675b3ac..366f4a1a2cb8 100644 --- a/trunk/drivers/hwmon/applesmc.c +++ b/trunk/drivers/hwmon/applesmc.c @@ -491,6 +491,12 @@ static void applesmc_idev_poll(unsigned long unused) /* 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)