All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@cam.ac.uk>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] local macro
Date: Wed, 06 Oct 2010 18:24:03 +0000	[thread overview]
Message-ID: <4CACBEC3.60108@cam.ac.uk> (raw)
In-Reply-To: <AANLkTi=t1ObqqZiamKdZGHxrWc6FEP-QqSxrsbordDTi@mail.gmail.com>

On 10/06/10 19:13, Paul Thomas wrote:
> I'm planning a rev of the ads7871 driver. I want to add in the ability
> to set the gain on the chip as well as do differential reads. To do
> this I'm adding a bunch of SENSOR_DEVICE_ATTR lines. Awhile ago I had
> got a suggestion from Jonathan to use a local macro for these
> statements. Would that be a macro that looped through calling the
> other macro 8 times with values 0-7? Could someone point me to an
> example where this is used?
I suspect I meant something like

#define ADS7871_VOLTAGE_ATTR(n) SENSOR_DEVICE_ATTR(in##n##_input, S_IRUGO, show_voltage, NULL, n);
But looking back at the usage, it really is a matter of taste, and I'm
not sure my suggestion was a good one in this case!

Jonathan

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

  parent reply	other threads:[~2010-10-06 18:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-06 18:13 [lm-sensors] local macro Paul Thomas
2010-10-06 18:23 ` Paul Thomas
2010-10-06 18:24 ` Jonathan Cameron [this message]
2010-10-06 19:31 ` Guenter Roeck
2010-10-06 19:46 ` Paul Thomas
2010-10-06 19:54 ` Paul Thomas
2010-10-06 20:47 ` Guenter Roeck
2010-10-06 21:02 ` Guenter Roeck
2010-10-06 21:29 ` Jean Delvare
2010-10-06 21:32 ` Jean Delvare
2010-10-06 21:45 ` Guenter Roeck
2010-10-06 22:04 ` Paul Thomas
2010-10-07  6:49 ` Jean Delvare
2010-10-07  9:46 ` Jonathan Cameron
2010-10-12  0:32 ` Paul Thomas

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=4CACBEC3.60108@cam.ac.uk \
    --to=jic23@cam.ac.uk \
    --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.