lkml.org 
[lkml]   [2009]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [lm-sensors] [PATCH] hwmon: Driver for Texas Instruments amc6821 chip
On Wed, 9 Sep 2009 09:34:35 +0200
Jean Delvare <khali@linux-fr.org> wrote:

> > #define set_temp_para(name, reg)\
> > static ssize_t set_##name(\
> > struct device *dev,\
> > struct device_attribute *attr,\
> > const char *buf,\
> > size_t count)\
> > {\
> > return set_helper(dev, attr, buf, count, &dev->name);\
> > }
> >
> > And then do all the real work in a common function? Rather than
> > expanding tens of copies of the same thing?
>
> Yes please. We got rid of macro-generated callbacks in most hwmon
> drivers a couple years ago already.

I never received an update to this patch so I'm retaining it in my tree
for now.



\
 
 \ /
  Last update: 2009-09-21 23:49    [W:0.047 / U:0.720 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site