From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4534BC433FF for ; Wed, 14 Aug 2019 17:23:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0DDA7206C2 for ; Wed, 14 Aug 2019 17:23:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565803429; bh=n7th62+p9HsiNvdVUJr1MZnEwS84TWzyJY78o6f1Fxs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=OaAPPBcgfyBU5i2At3p2Duje+97J1ybfkRzHbmQMIKzw0L9Tjq8TTerpsWhNn0Sjy Ps+hchqs41HAb45Gw2L/L5b7xIYI6j2S5sjXqZ9Q3EcpXkSC09Uzfb970GN+yvZFKw /EnmJ9K7ranbDFfacdmnX+N3BA/U2ksFcc6S492Q= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729294AbfHNRHN (ORCPT ); Wed, 14 Aug 2019 13:07:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:56644 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729802AbfHNRHM (ORCPT ); Wed, 14 Aug 2019 13:07:12 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8108D214DA; Wed, 14 Aug 2019 17:07:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565802432; bh=n7th62+p9HsiNvdVUJr1MZnEwS84TWzyJY78o6f1Fxs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WXsWWpgv0zYext8m8LoCTpdPC/lmZDe7O7Oppr3wtJaVSQqVvO+z5u4u4GmY4n5gA zvEbnLl62rM7H01v5WsW7I5VN2O4PafP/WKAFz6uVnctLHGY1Px8CPBM3or+zVZij0 LKj6080el+q/zmbS45yJwwlKEncR2pskahsrQsEs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Iker Perez del Palomar Sustatxa , Guenter Roeck Subject: [PATCH 5.2 124/144] hwmon: (lm75) Fixup tmp75b clr_mask Date: Wed, 14 Aug 2019 19:01:20 +0200 Message-Id: <20190814165805.116317258@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190814165759.466811854@linuxfoundation.org> References: <20190814165759.466811854@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Iker Perez del Palomar Sustatxa commit a95a4f3f2702b55a89393bf0f1b2b3d79e0f7da2 upstream. The configuration register of the tmp75b sensor is 16bit long, however the first byte is reserved, so there is not no need to take care of it. Because the order of the bytes is little endian and it is only necessary to write one byte, the desired bits must be shifted into a 8 bit range. Fixes: 39abe9d88b30 ("hwmon: (lm75) Add support for TMP75B") Cc: stable@vger.kernel.org Signed-off-by: Iker Perez del Palomar Sustatxa Link: https://lore.kernel.org/r/20190801075324.4638-1-iker.perez@codethink.co.uk Signed-off-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman --- drivers/hwmon/lm75.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/hwmon/lm75.c +++ b/drivers/hwmon/lm75.c @@ -343,7 +343,7 @@ lm75_probe(struct i2c_client *client, co data->sample_time = MSEC_PER_SEC / 2; break; case tmp75b: /* not one-shot mode, Conversion rate 37Hz */ - clr_mask |= 1 << 15 | 0x3 << 13; + clr_mask |= 1 << 7 | 0x3 << 5; data->resolution = 12; data->sample_time = MSEC_PER_SEC / 37; break;