[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090728092647.23ff0eaa@hyperion.delvare>
Date: Tue, 28 Jul 2009 09:26:47 +0200
From: Jean Delvare <khali@...ux-fr.org>
To: Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc: Samuel Ortiz <sameo@...ux.intel.com>, linux-kernel@...r.kernel.org,
lm-sensors@...sensors.org
Subject: Re: [lm-sensors] [PATCH 12/22] hwmon: WM831x PMIC hardware
monitoring driver
On Mon, 27 Jul 2009 21:46:14 +0100, Mark Brown wrote:
> On Mon, Jul 27, 2009 at 09:44:19PM +0200, Jean Delvare wrote:
> > On Mon, 27 Jul 2009 14:46:02 +0100, Mark Brown wrote:
> > > +#define WM831X_NAMED_VOLTAGE(id, name) \
> > > + static SENSOR_DEVICE_ATTR(in##id##_input, S_IRUGO, show_voltage,\
> > > + NULL, name); \
> >
> > I guess you could just call WM831X_VOLTAGE(id, name).
>
> That clashes with the unnamed voltage above. I could also call them
> _NAMED and _UNNAMED, I suppose.
Sorry for not being clear. I simply meant you could write the following:
define WM831X_VOLTAGE(id, name) \
static SENSOR_DEVICE_ATTR(in##id##_input, S_IRUGO, show_voltage, \
NULL, name)
#define WM831X_NAMED_VOLTAGE(id, name) \
WM831X_VOLTAGE(id, name); \
static SENSOR_DEVICE_ATTR(in##id##_label, S_IRUGO, show_label, \
NULL, name)
Which makes it more obvious that WM831X_NAMED_VOLTAGE is WM831X_VOLTAGE
+ label. But it's really up to you which way you prefer.
--
Jean Delvare
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists