Re: [PATCH] hwmon: (w83627ehf): fix broken driver init

From: Alexander Beregalov
Date: Sat Nov 05 2011 - 08:08:46 EST


On 5 November 2011 08:51, Guenter Roeck <guenter.roeck@xxxxxxxxxxxx> wrote:
> Followup - something like
> Â Â Â Â Â Â Â Âconst char *label = NULL;
>
> Â Â Â Â Â Â Â Âif (data->temp_label)
> Â Â Â Â Â Â Â Â Â Â Â Âlabel = data->temp_label[data->temp_src[i]];
>
> Â Â Â Â Â Â Â Â/* Digital source overrides analog type */
> Â Â Â Â Â Â Â Âif (label && strncmp(label, "PECI", 4) == 0)
> Â Â Â Â Â Â Â Â Â Â Â Âdata->temp_type[i] = 6;
> Â Â Â Â Â Â Â Âelse if (label && strncmp(label, "AMD", 3) == 0)
> Â Â Â Â Â Â Â Â Â Â Â Âdata->temp_type[i] = 5;
> Â Â Â Â Â Â Â Âelse if ((tmp & (0x02 << i)))
>
> should do it. I am open to better ideas...

Works for me, thanks. You may add my
Tested-by: Alexander Beregalov <a.beregalov@xxxxxxxxx>
èº{.nÇ+‰·Ÿ®‰­†+%ŠËlzwm…ébëæìr¸›zX§»®w¥Š{ayºÊÚë,j­¢f£¢·hš‹àz¹®w¥¢¸ ¢·¦j:+v‰¨ŠwèjØm¶Ÿÿ¾«‘êçzZ+ƒùšŽŠÝj"ú!¶iO•æ¬z·švØ^¶m§ÿðà nÆàþY&—