From: Jean Delvare <khali@linux-fr.org>
To: Frank Seidel <fseidel@suse.de>
Cc: linux kernel <linux-kernel@vger.kernel.org>,
akpm@linux-foundation.org, rlove@rlove.org, protasnb@gmail.com,
Michael Ruoss <miruoss@student.ethz.ch>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Tim Gardner <tim.gardner@canonical.com>,
Frank Seidel <frank@f-seidel.de>,
multinymous@gmail.com, Frank Seidel <fseidel@suse.de>
Subject: Re: [PATCH] hwmon/hdaps: remove redundant sysfs invert
Date: Thu, 19 Feb 2009 18:27:14 +0100 [thread overview]
Message-ID: <20090219182714.423757a9@hyperion.delvare> (raw)
In-Reply-To: <499D543B.6050703@suse.de>
Hi Frank,
On Thu, 19 Feb 2009 13:44:43 +0100, Frank Seidel wrote:
> From: Frank Seidel <frank@f-seidel.de>
>
> Get rid of sysfs attribute "invert" as its
> redundant to module parameter.
It seems it isn't that easy:
>
> 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();
Apparently recalibration is necessary when you change the inversion
settings. The module parameter, which you made writable in a previous
patch, does _not_ recalibrate when changed.
So it was probably not such a good idea to make the module parameter
writable, and that should be reverted. Which in turn means that the
sysfs attribute "invert" has to stay.
> -
> - 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,
> };
>
--
Jean Delvare
next prev parent reply other threads:[~2009-02-19 17:27 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-13 12:38 [PATCH] hwmon/hdaps: Fix bug 7154 inversion of separate axis Frank Seidel
2009-02-14 22:25 ` Dmitry Torokhov
2009-02-15 13:34 ` Jean Delvare
2009-02-15 0:32 ` Shem Multinymous
2009-02-15 9:27 ` Jean Delvare
2009-02-15 13:41 ` Matthew Garrett
2009-02-15 15:23 ` Jean Delvare
2009-02-15 15:28 ` Matthew Garrett
2009-02-15 9:36 ` Jean Delvare
2009-02-15 12:16 ` [PATCHv2] " Frank Seidel
2009-02-15 13:01 ` [PATCHv3] " Frank Seidel
2009-02-15 14:37 ` Jean Delvare
2009-02-19 12:43 ` [PATCH] hwmon/hdaps: Fix bug 7154 adaption for Thinkpad X41 Frank Seidel
2009-02-19 17:16 ` Jean Delvare
2009-02-19 12:44 ` [PATCH] hwmon/hdaps: remove redundant sysfs invert Frank Seidel
2009-02-19 17:27 ` Jean Delvare [this message]
2009-02-19 20:00 ` Frank Seidel
2009-02-19 20:34 ` Jean Delvare
2009-02-20 8:35 ` Frank Seidel
2009-02-15 13:02 ` [PATCHv2] hwmon/hdaps: Fix bug 7154 inversion of separate axis Frank Seidel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090219182714.423757a9@hyperion.delvare \
--to=khali@linux-fr.org \
--cc=akpm@linux-foundation.org \
--cc=dmitry.torokhov@gmail.com \
--cc=frank@f-seidel.de \
--cc=fseidel@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=miruoss@student.ethz.ch \
--cc=multinymous@gmail.com \
--cc=protasnb@gmail.com \
--cc=rlove@rlove.org \
--cc=tim.gardner@canonical.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.