From afde5c3eff75a3804fdf77cc467153e75e655388 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Mon, 1 Dec 2008 13:44:12 +0000 Subject: [PATCH] Refactor code in andigilog_detect. git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5487 7894878c-1315-0410-8ee3-d5d059ff63e0 --- prog/detect/sensors-detect | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index 46c33219..b529b1fd 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -3777,18 +3777,10 @@ sub andigilog_detect return if $mid != 0x61; # Andigilog - if ($chip == 0) { - return if $cid != 0x62; - return 5; - } - if ($chip == 1) { - return if $cid != 0x69; - return 5; - } - if ($chip == 2) { - return if $cid != 0x6C && $cid != 0x6D; - return 5; - } + return if $chip == 0 && $cid != 0x62; + return if $chip == 1 && $cid != 0x69; + return if $chip == 2 && ($cid != 0x6C && $cid != 0x6D); + return 5; } # Registers used: