From patchwork Tue Mar 11 13:41:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gianluca Gennari X-Patchwork-Id: 3812551 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 96565BF540 for ; Tue, 11 Mar 2014 13:42:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D50FB201B4 for ; Tue, 11 Mar 2014 13:42:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0BBDC2021A for ; Tue, 11 Mar 2014 13:42:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754957AbaCKNmJ (ORCPT ); Tue, 11 Mar 2014 09:42:09 -0400 Received: from mail-ee0-f45.google.com ([74.125.83.45]:52655 "EHLO mail-ee0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752078AbaCKNmD (ORCPT ); Tue, 11 Mar 2014 09:42:03 -0400 Received: by mail-ee0-f45.google.com with SMTP id d17so3739270eek.32 for ; Tue, 11 Mar 2014 06:42:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=osX9ic3kCIK8MsrY5jG7xeFXlxWXmh/I98IQWURCFwI=; b=tUgvHEm4QSop5Yy4oM/ijDkvBaMG1xRsvQc/crle5DWVZMBDfEv0qhMQ0DgX8jFFFZ xjHjo81CsWmLc2fS47DklG/Tl6SM4FocsDFTU4gnLRJT9uh+nXfB87pxruzVPMNcUbjC uvUsobiE6FQK3Fft3syNJZyHwThvpg8ib7lCEJMdA9LoRUx2mflxqwpCI/RLL0+uuFJ6 U1n1jjJmNR5B3+mwQZdPHE7utN65tWIdcRLW/W5H6hzB994xBRiAzHW8YBJw5nBUT/vQ V6we+LJ7yay1wG2S8or72csz6dxGzUR7WyJmKwKU/2DiWg/vTEvhsc39ERcx2R09b7pg f5Iw== X-Received: by 10.15.44.202 with SMTP id z50mr3820636eev.81.1394545321642; Tue, 11 Mar 2014 06:42:01 -0700 (PDT) Received: from precision.spark.local (93-51-229-180.ip269.fastwebnet.it. [93.51.229.180]) by mx.google.com with ESMTPSA id j41sm57673960eeg.10.2014.03.11.06.41.58 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 11 Mar 2014 06:42:00 -0700 (PDT) From: Gianluca Gennari To: linux-media@vger.kernel.org, m.chehab@samsung.com Cc: dheitmueller@kernellabs.com, Gianluca Gennari Subject: [PATCH] drx39xyj: fix 64 bit division on 32 bit arch Date: Tue, 11 Mar 2014 14:41:47 +0100 Message-Id: <1394545307-624-1-git-send-email-gennarone@gmail.com> X-Mailer: git-send-email 1.9.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_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 Fix this linker warning: WARNING: "__divdi3" [media_build/v4l/drx39xyj.ko] undefined! Signed-off-by: Gianluca Gennari --- drivers/media/dvb-frontends/drx39xyj/drxj.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/media/dvb-frontends/drx39xyj/drxj.c b/drivers/media/dvb-frontends/drx39xyj/drxj.c index 2352327..0dec073 100644 --- a/drivers/media/dvb-frontends/drx39xyj/drxj.c +++ b/drivers/media/dvb-frontends/drx39xyj/drxj.c @@ -12002,13 +12002,16 @@ static int drx39xxj_read_signal_strength(struct dvb_frontend *fe, static int drx39xxj_read_snr(struct dvb_frontend *fe, u16 *snr) { struct dtv_frontend_properties *p = &fe->dtv_property_cache; + u64 tmp64; if (p->cnr.stat[0].scale == FE_SCALE_NOT_AVAILABLE) { *snr = 0; return 0; } - *snr = p->cnr.stat[0].svalue / 10; + tmp64 = p->cnr.stat[0].svalue; + do_div(tmp64, 10); + *snr = tmp64; return 0; }