Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp35257ybh; Tue, 10 Mar 2020 18:44:09 -0700 (PDT) X-Google-Smtp-Source: ADFU+vudx2QREDrn0CuiBuhdzSGMou5IyG/gAY3U63dK+Wc5E6jdxkl8cZVzcZThtH6nSDmjQb34 X-Received: by 2002:aca:ed54:: with SMTP id l81mr373288oih.69.1583891049372; Tue, 10 Mar 2020 18:44:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583891049; cv=none; d=google.com; s=arc-20160816; b=sxb0v+WRv4KljFxmNeIwYIAtmHwgZQ/0eQQ0qlq8uDypGG6KNXMwCEPw2Zt2yIqMBb 4W8eFrOAEiqGkWbhy4gm2j3dpXAM2txTlzM1se+tN4nM7HJ+qOVMiSG9QFsmXUIz1VdQ 9B4NmzIejnFue5s4dTgOAXmHsjrjwQWj7jLKUMH3pUgyDfEm+LiQFSfi2DHET2vqufLm V2vjaavsV8F+5f1kiZgGMViCq8xtC2bTuG6rLsW44bNmIjsAVCx8U4WZ6udnC0DOE54l HGp1yi1+oSt0IpIpszntEkwClBjR7PUXluVkm7e5gLnJhY2iPpsN5eodNE8Pbz9XMwha KYqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from; bh=eyyW1fSRkuKsPcKFKmjvW6JMnRZJF9NtIp5N6Xres88=; b=qXOadDd/UZGabdxxtRfEfnyE+GzGe8p9SBttWxSnmSdAc+RWMaGP9EUBNKjXc9M8UJ LPST6cWtQGv4JgmAoiPVnzjFxlJx0EPBrQks3FQUMznmW4qppWFkhjT83HBGDVJrG/+s MoAg8K5MoGzN3ZwdFpX7QhSGTziDUu4RW0wa8Xw4Xp+uJGnylw2reXE0Q7FkScxPXcVX L8f8vNn2kK3IumJ3gmRz3ovc3U0NQ3U1UVoFarMF7d0NFt4WTnZmXUeQmhP68zQYGvy1 Mby4udEXiC9tE6eljvf9eyqfYL6abtKQBFE+3Pseze+32UGJPZLzhvhTf9+UCFvw1btN sOiQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n9si246796ota.103.2020.03.10.18.43.57; Tue, 10 Mar 2020 18:44:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728101AbgCKBmC (ORCPT + 99 others); Tue, 10 Mar 2020 21:42:02 -0400 Received: from alexa-out-sd-02.qualcomm.com ([199.106.114.39]:38817 "EHLO alexa-out-sd-02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727484AbgCKBlZ (ORCPT ); Tue, 10 Mar 2020 21:41:25 -0400 Received: from unknown (HELO ironmsg02-sd.qualcomm.com) ([10.53.140.142]) by alexa-out-sd-02.qualcomm.com with ESMTP; 10 Mar 2020 18:41:24 -0700 Received: from gurus-linux.qualcomm.com ([10.46.162.81]) by ironmsg02-sd.qualcomm.com with ESMTP; 10 Mar 2020 18:41:24 -0700 Received: by gurus-linux.qualcomm.com (Postfix, from userid 383780) id 0E0E24AEB; Tue, 10 Mar 2020 18:41:24 -0700 (PDT) From: Guru Das Srinagesh To: linux-pwm@vger.kernel.org Cc: Thierry Reding , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Subbaraman Narayanamurthy , linux-kernel@vger.kernel.org, Guru Das Srinagesh , Mauro Carvalho Chehab , Richard Fontana , Thomas Gleixner , Kate Stewart , Allison Randal , linux-media@vger.kernel.org Subject: [PATCH v8 04/12] ir-rx51: Use 64-bit division macro Date: Tue, 10 Mar 2020 18:41:13 -0700 Message-Id: X-Mailer: git-send-email 1.9.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since the PWM framework is switching struct pwm_state.period's datatype to u64, prepare for this transition by using DIV_ROUND_CLOSEST_ULL to handle a 64-bit dividend. Cc: Mauro Carvalho Chehab Cc: Richard Fontana Cc: Thomas Gleixner Cc: Kate Stewart Cc: Allison Randal Cc: linux-media@vger.kernel.org Signed-off-by: Guru Das Srinagesh --- drivers/media/rc/ir-rx51.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/rc/ir-rx51.c b/drivers/media/rc/ir-rx51.c index 8574eda..9a5dfd7 100644 --- a/drivers/media/rc/ir-rx51.c +++ b/drivers/media/rc/ir-rx51.c @@ -241,7 +241,8 @@ static int ir_rx51_probe(struct platform_device *dev) } /* Use default, in case userspace does not set the carrier */ - ir_rx51.freq = DIV_ROUND_CLOSEST(pwm_get_period(pwm), NSEC_PER_SEC); + ir_rx51.freq = DIV_ROUND_CLOSEST_ULL(pwm_get_period(pwm), + NSEC_PER_SEC); pwm_put(pwm); hrtimer_init(&ir_rx51.timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project