From: khali@linux-fr.org (Jean Delvare)
To: lm-sensors@vger.kernel.org
Subject: max1619
Date: Thu, 19 May 2005 06:25:00 +0000 [thread overview]
Message-ID: <20040527194515.04c995e8.khali@linux-fr.org> (raw)
In-Reply-To: <200405211303.18083.fishor@gmx.net>
> > +show_temp(temp_input1, TEMP_FROM_REG);
> > +show_temp(temp_input2, TEMP_FROM_REG);
> > +show_temp(temp_low2, TEMP_FROM_REG);
> > +show_temp(temp_high2, TEMP_FROM_REG);
> > +show_temp(temp_crit2, TEMP_FROM_REG);
> > +show_temp(temp_hyst2, TEMP_FROM_REG);
> >
> > TEMP_FROM_REG doesn't have to be passed by parameter, since it's
> > always the same.
>
> Jaen, I'm not sure what you mean. If you about "temp_hyst2", in these
> driverer hyst is chenchebl, not always the same.
What I mean is that you could avoid passing the converter as a
parameter:
+#define show_temp(value) \
+static ssize_t show_##value(struct device *dev, char *buf) \
+{ \
+ struct max1619_data *data = max1619_update_device(dev); \
+ return sprintf(buf, "%d\n", TEMP_FROM_REG(data->value)); \
+}
+show_temp(temp_input1);
+show_temp(temp_input2);
+show_temp(temp_low2);
+show_temp(temp_high2);
+show_temp(temp_crit2);
+show_temp(temp_hyst2);
Because all the files use the same converter (TEMP_FROM_REG).
> Actioly i dont know who is Greg. Am i can finde his Email in
> documentation ?
Greg Kroah-Hartman (aka Greg KH) is the person responsible (among
several over things) of the I2C subsystem in Linux 2.6. He was in CC: in
my previous post. And yes, you will find his contact information several
times in both CREDITS and MAINTAINERS files.
Thanks.
--
Jean Delvare
http://khali.linux-fr.org/
next prev parent reply other threads:[~2005-05-19 6:25 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-19 6:24 max1619 Alexey Fisher
2005-05-19 6:24 ` max1619 Jean Delvare
2005-05-19 6:24 ` max1619 Jean Delvare
2005-05-19 6:24 ` max1619 Alexey Fisher
2005-05-19 6:24 ` max1619 Alexey Fisher
2005-05-19 6:24 ` max1619 Jean Delvare
2005-05-19 6:24 ` max1619 Jean Delvare
2005-05-19 6:24 ` max1619 Alexey Fisher
2005-05-19 6:24 ` max1619 Alexey Fisher
2005-05-19 6:24 ` max1619 Jean Delvare
2005-05-19 6:24 ` max1619 Jean Delvare
2005-05-19 6:24 ` max1619 Alexey Fisher
2005-05-19 6:24 ` max1619 Alexey Fisher
2005-05-19 6:24 ` max1619 Alexey Fisher
2005-05-19 6:25 ` max1619 Alexey Fisher
2005-05-19 6:25 ` max1619 Jean Delvare
2005-05-19 6:25 ` max1619 Greg KH
2005-05-19 6:25 ` max1619 Alexey Fisher
2005-05-19 6:25 ` max1619 Alexey Fisher
2005-05-19 6:25 ` max1619 Jean Delvare
2005-05-19 6:25 ` Jean Delvare [this message]
2005-05-19 6:25 ` max1619 Alexey Fisher
2005-05-19 6:25 ` max1619 Jean Delvare
2005-05-19 6:25 ` max1619 Alexey Fisher
2005-05-19 6:25 ` max1619 Jean Delvare
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=20040527194515.04c995e8.khali@linux-fr.org \
--to=khali@linux-fr.org \
--cc=lm-sensors@vger.kernel.org \
/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.