From 1f77192d62a8c39d7d93467fc027210cd48a9171 Mon Sep 17 00:00:00 2001 From: Ralph Metzler Date: Wed, 14 Dec 2016 19:24:58 +0100 Subject: [PATCH] mask lower bits for temp --- ddbridge/ddbridge-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ddbridge/ddbridge-core.c b/ddbridge/ddbridge-core.c index d7aba5b..6bfd392 100644 --- a/ddbridge/ddbridge-core.c +++ b/ddbridge/ddbridge-core.c @@ -4454,13 +4454,13 @@ static ssize_t temp_show(struct device *device, if (dev->link[0].info->type == DDB_MOD) { if (dev->link[0].info->version == 2) { - temp = ddbreadl(dev, TEMPMON2_BOARD); + temp = 0xffff & ddbreadl(dev, TEMPMON2_BOARD); temp = (temp * 1000) >> 8; - temp2 = ddbreadl(dev, TEMPMON2_FPGACORE); + temp2 = 0xffff & ddbreadl(dev, TEMPMON2_FPGACORE); temp2 = (temp2 * 1000) >> 8; - temp3 = ddbreadl(dev, TEMPMON2_QAMCORE); + temp3 = 0xffff & ddbreadl(dev, TEMPMON2_QAMCORE); temp3 = (temp3 * 1000) >> 8; return sprintf(buf, "%d %d %d\n", temp, temp2, temp3);