[patch pc87360 reroll 2/6] function renames, prepping for de-macro'g

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> getter-setter callback-function renames (preparation for 
> de-macro-ization)
>    avoid name-clashes when we de-macro-ize later, and improve clarity
>
>    Currently we have:
>
>    423 #define show_and_set_therm(offset) \
>    424 static ssize_t show_temp##offset##_input(struct device *dev, 
> struct device_attribute *attr, char *buf    424 ) \
>    425 { \
>
>    537 #define show_and_set_temp(offset) \
>    538 static ssize_t show_temp##offset##_input(struct device *dev, 
> struct device_attribute *attr, char *buf    538 ) \
>    539 { \
>
> these are distinguished purely by the ##offset## in the callback name,
> which will go away in next patch, so we get ready by changing temp to 
> therm
> in the show_and_set_therm macro.
>
> 2nd situation is similar, this time with one of the fan callbacks and 
> a fan-helper function.
>
>    248
>    249 static ssize_t set_fan_min(struct device *dev, const char *buf,
>    250         size_t count, int nr)
>    251 {
>
>    302 } \
>    303 static ssize_t set_fan##offset##_min(struct device *dev, struct 
> device_attribute *attr, const char *b    303 uf, \
>    304         size_t count) \
>

$ diffstat 02-pc87360-fn-renames
 pc87360.c |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)

Signed-off-by:  Jim Cromie <jcromie at divsol.com>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 02-pc87360-fn-renames
Url: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20050803/d620d77b/attachment.pl 


[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux