lkml.org 
[lkml]   [2009]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] hwmon/hdaps: remove redundant sysfs invert
From: Frank Seidel <frank@f-seidel.de>

Get rid of sysfs attribute "invert" as its
redundant to module parameter.

Signed-off-by: Frank Seidel <frank@f-seidel.de>
---
drivers/hwmon/hdaps.c | 24 ------------------------
1 file changed, 24 deletions(-)
--- a/drivers/hwmon/hdaps.c
+++ b/drivers/hwmon/hdaps.c
@@ -428,28 +428,6 @@ static ssize_t hdaps_calibrate_store(str
return count;
}

-static ssize_t hdaps_invert_show(struct device *dev,
- struct device_attribute *attr, char *buf)
-{
- return sprintf(buf, "%u\n", hdaps_invert);
-}
-
-static ssize_t hdaps_invert_store(struct device *dev,
- struct device_attribute *attr,
- const char *buf, size_t count)
-{
- int invert;
-
- if (sscanf(buf, "%d", &invert) != 1 ||
- invert < 0 || invert > HDAPS_BOTH_AXES)
- return -EINVAL;
-
- hdaps_invert = invert;
- hdaps_calibrate();
-
- return count;
-}
-
static DEVICE_ATTR(position, 0444, hdaps_position_show, NULL);
static DEVICE_ATTR(variance, 0444, hdaps_variance_show, NULL);
static DEVICE_ATTR(temp1, 0444, hdaps_temp1_show, NULL);
@@ -457,7 +435,6 @@ static DEVICE_ATTR(temp2, 0444, hdaps_te
static DEVICE_ATTR(keyboard_activity, 0444, hdaps_keyboard_activity_show, NULL);
static DEVICE_ATTR(mouse_activity, 0444, hdaps_mouse_activity_show, NULL);
static DEVICE_ATTR(calibrate, 0644, hdaps_calibrate_show,hdaps_calibrate_store);
-static DEVICE_ATTR(invert, 0644, hdaps_invert_show, hdaps_invert_store);

static struct attribute *hdaps_attributes[] = {
&dev_attr_position.attr,
@@ -467,7 +444,6 @@ static struct attribute *hdaps_attribute
&dev_attr_keyboard_activity.attr,
&dev_attr_mouse_activity.attr,
&dev_attr_calibrate.attr,
- &dev_attr_invert.attr,
NULL,
};


\
 
 \ /
  Last update: 2009-02-19 13:53    [from the cache]
©2003-2011 Jasper Spaans