Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 56914
b: refs/heads/master
c: fa74419
h: refs/heads/master
v: v3
  • Loading branch information
Nicolas Boichat authored and Linus Torvalds committed May 24, 2007
1 parent f141b90 commit eee5fa2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ae2d990eede0ef5938c210d48a177c044258ecd8
refs/heads/master: fa74419bb7b51af4bbb66116d14cc92f0b5aff25
10 changes: 10 additions & 0 deletions trunk/drivers/hwmon/applesmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit eee5fa2

Please sign in to comment.