[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080223095217.GA28356@flint.arm.linux.org.uk>
Date: Sat, 23 Feb 2008 09:52:17 +0000
From: Russell King - ARM Linux <linux@....linux.org.uk>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Liam Girdwood <lg@...nsource.wolfsonmicro.com>,
linux-kernel <linux-kernel@...r.kernel.org>,
linux-arm-kernel <linux-arm-kernel@...ts.arm.linux.org.uk>
Subject: Re: [PATCH 4/6] regulator: regulator core.
On Sat, Feb 23, 2008 at 12:05:38AM -0800, Andrew Morton wrote:
> On Wed, 20 Feb 2008 17:09:11 +0000 Liam Girdwood <lg@...nsource.wolfsonmicro.com> wrote:
>
> > This patch provides the regulator framework core. The core also provides a
> > sysfs interface for userspace information.
> >
> > ...
> >
> > +
> > +/* We need to undef the current macro (from include/asm/current.h) otherwise
> > + * our "current" sysfs entry becomes "(get_current())".
> > + */
> > +#undef current
>
> err, no ;) Please rename your stuff.
Renaming is not an option - "current" is an electronic term for which
there is no alternative. The real problem is this __ATTR macro crap:
+ __ATTR(current, 0444, regulator_uA_show, NULL),
#define __ATTR(_name,_mode,_show,_store) { \
.attr = {.name = __stringify(_name), .mode = _mode }, \
.show = _show, \
.store = _store, \
}
If __ATTR allowed the name to be passed as a string, instead of stupidly
stringifying it, then this wouldn't be needed. So I suggest that the
#undef stands _until_ we fix this stupid macro. Or we rename the
"current" macro to something that doesn't clash with accepted scientific
and engineering terminology.
--
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