From patchwork Sat Aug 24 16:49:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 2849278 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E6D6ABF546 for ; Sat, 24 Aug 2013 19:50:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 332372024C for ; Sat, 24 Aug 2013 19:50:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C3CD720184 for ; Sat, 24 Aug 2013 19:50:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755445Ab3HXTub (ORCPT ); Sat, 24 Aug 2013 15:50:31 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:56585 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755432Ab3HXTub (ORCPT ); Sat, 24 Aug 2013 15:50:31 -0400 Received: from [177.143.133.66] (helo=smtp.w2.samsung.com) by bombadil.infradead.org with esmtpsa (Exim 4.80.1 #2 (Red Hat Linux)) id 1VDJqt-0006x4-L1; Sat, 24 Aug 2013 19:50:27 +0000 Received: from mchehab by smtp.w2.samsung.com with local (Exim 4.80.1) (envelope-from ) id 1VDH24-0002Yy-3V; Sat, 24 Aug 2013 13:49:48 -0300 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Linux Media Mailing List , Mauro Carvalho Chehab Subject: [PATCH] [media] msi3101: Fix compilation on i386 Date: Sat, 24 Aug 2013 13:49:46 -0300 Message-Id: <1377362986-9818-1-git-send-email-m.chehab@samsung.com> X-Mailer: git-send-email 1.8.3.1 To: unlisted-recipients:; (no To-header on input) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP as reported by: kbuild test robot : [linuxtv-media:master 459/499] sdr-msi3101.c:undefined reference to `__umoddi3' Reported-by: kbuild test robot Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/msi3101/sdr-msi3101.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/staging/media/msi3101/sdr-msi3101.c b/drivers/staging/media/msi3101/sdr-msi3101.c index eebe1d0..24c7b70 100644 --- a/drivers/staging/media/msi3101/sdr-msi3101.c +++ b/drivers/staging/media/msi3101/sdr-msi3101.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -1332,7 +1333,7 @@ static int msi3101_set_tuner(struct msi3101_state *s) int ret, i, len; unsigned int n, m, thresh, frac, vco_step, tmp, f_if1; u32 reg; - u64 f_vco; + u64 f_vco, tmp64; u8 mode, filter_mode, lo_div; const struct msi3101_gain *gain_lut; static const struct { @@ -1436,8 +1437,10 @@ static int msi3101_set_tuner(struct msi3101_state *s) #define F_OUT_STEP 1 #define R_REF 4 f_vco = (f_rf + f_if + f_if1) * lo_div; - n = f_vco / (F_REF * R_REF); - m = f_vco % (F_REF * R_REF); + + tmp64 = f_vco; + m = do_div(tmp64, F_REF * R_REF); + n = (unsigned int) tmp64; vco_step = F_OUT_STEP * lo_div; thresh = (F_REF * R_REF) / vco_step;