Re: [PATCH v2 4/5] hwmon: (ina2xx) Use structure array to distinguish chip types

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

 



On Tue, 11 Sep 2012 09:34:18 -0700, Guenter Roeck wrote:
> Replace per-device initialization and per-device calculation code with
> per-device configuration data, which is then used to configure the chip and
> perform calculations based on that data.
> 
> This patch reduces code size by more than 400 bytes on x86_64.
> 
> Cc: Lothar Felten <l-felten@xxxxxx>
> Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>
> ---
> v2: Review feedback:
>     Fix for word swap operations split to second patch
>     Change config variable name to config_default
>     Change variable types to const where appropriate
>     Use DIV_ROUND_CLOSEST for divide operation in INA2XX_BUS_VOLTAGE case
>     Get rid of data->registers (use data->config->registers instead)
> 
>  drivers/hwmon/ina2xx.c |  159 +++++++++++++++++-------------------------------
>  1 file changed, 56 insertions(+), 103 deletions(-)
> (...)

Acked-by: Jean Delvare <khali@xxxxxxxxxxxx>

-- 
Jean Delvare

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


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

  Powered by Linux