Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp57209ybm; Tue, 26 May 2020 10:38:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxeV3dQEb/BeDi919pjaQXiVbNiIWcgm5jKw6J7zFEjGhbQpH8LKnNYpipuuekmJItnxmaU X-Received: by 2002:a50:baa3:: with SMTP id x32mr20308369ede.251.1590514682131; Tue, 26 May 2020 10:38:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590514682; cv=none; d=google.com; s=arc-20160816; b=gB/T0jtwsqZ5Ag3x1vQYYrRh1jXTq5zlqd1R4gQYU6tjiVEI+3I/Q1G+obNR2e/76q 1YuXZ0ZToHl4oJ3qALbfILk6lcYmHEmYdMIpgFBZLcdgQ+RrHai8YA5tLUPEL49Uey2I /FYLhz0ZQKTtKJy5ei8ZLEjECObGppjAi6vejhI6EcAOPM4GI6nJRsBHd5E4Pm9Lp2mc g0ToWZCOOFDcbSxFwDPNEzSC8VGFeWYrFmmVBlVtcuvfSRBGBrdt4JqB19jTc9qaosw5 FR6icptlTowxhPdPGcPbryLYEILsBGyoE1Xir/BhJGlAIoJo1+hQFT9iQmZpiMVVDRGB XQ5Q== 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=b+EI7GrAl/qwVZXJfpK81oYVCLnN29i+mYS1XrR94Kk=; b=xRlErI1bhMyF0ITIZ9fmTtmuaYzdEzUKsrlepYcNdFgXjInplJFzqoPGvP/dIcWGFl GS5+B8P5fHpz6ppHaUnGDqJVwdPhnp5so1Aqbj3Ur7W03PrTW7D5V9sfX6ik/H6TAk6Z kr1/8CeEVB0Xo3JyXdHm3T/NOWw9eKu3EWYrOJmEIyWZArqmIjV8cLTbty2aqzJmuLMN qZY/xpxHN0CgmvCIbMW91p2jTuwRNVAHHcFA32UYMHZcOGNqHrWmhi5UQnAFcKhUQbZj Lr4cRN3Vmbz2kvyud7QlegMYgtTrw0fb9BRuIcQIfNd4tkTn7wGjrykAc7srZobI4wv4 uThg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x15si266159ejc.190.2020.05.26.10.37.39; Tue, 26 May 2020 10:38:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389183AbgEZRfc (ORCPT + 99 others); Tue, 26 May 2020 13:35:32 -0400 Received: from alexa-out-sd-01.qualcomm.com ([199.106.114.38]:65094 "EHLO alexa-out-sd-01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388882AbgEZRfQ (ORCPT ); Tue, 26 May 2020 13:35:16 -0400 Received: from unknown (HELO ironmsg01-sd.qualcomm.com) ([10.53.140.141]) by alexa-out-sd-01.qualcomm.com with ESMTP; 26 May 2020 10:35:14 -0700 Received: from gurus-linux.qualcomm.com ([10.46.162.81]) by ironmsg01-sd.qualcomm.com with ESMTP; 26 May 2020 10:35:13 -0700 Received: by gurus-linux.qualcomm.com (Postfix, from userid 383780) id 4E1DA4CA0; Tue, 26 May 2020 10:35:13 -0700 (PDT) From: Guru Das Srinagesh To: linux-pwm@vger.kernel.org, Thierry Reding , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Cc: Subbaraman Narayanamurthy , David Collins , linux-kernel@vger.kernel.org, Joe Perches , Stephen Boyd , Lee Jones , Arnd Bergmann , Geert Uytterhoeven , Guenter Roeck , Daniel Thompson , Dan Carpenter , linux-arm-kernel@lists.infradead.org, Guru Das Srinagesh Subject: [PATCH v15 03/11] ir-rx51: Use 64-bit division macro Date: Tue, 26 May 2020 10:35:03 -0700 Message-Id: <68f17a69e1c818ee80d6c29c852df35a126b47c6.1590514331.git.gurus@codeaurora.org> 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. Signed-off-by: Guru Das Srinagesh Acked-by: Sean Young --- 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