Skip to content

Commit

Permalink
hwmon-vid: Don't spam the logs when VRM version is missing
Browse files Browse the repository at this point in the history
If we cannot guess which VRM version the CPU uses, we set it to 0 and
log it. So we shouldn't spam the log each time vid_from_reg() is
later called with vrm 0.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Rudolf Marek <r.marek@assembler.cz>
  • Loading branch information
Jean Delvare authored and Jean Delvare committed May 27, 2007
1 parent e142e2a commit 45f2acc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/hwmon/hwmon-vid.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ int vid_from_reg(int val, u8 vrm)
val &= 0x7f;
return(val > 0x77 ? 0 : (1500000 - (val * 12500) + 500) / 1000);
default: /* report 0 for unknown */
printk(KERN_INFO "hwmon-vid: requested unknown VRM version\n");
if (vrm)
printk(KERN_WARNING "hwmon-vid: Requested unsupported "
"VRM version (%u)\n", (unsigned int)vrm);
return 0;
}
}
Expand Down

0 comments on commit 45f2acc

Please sign in to comment.