From patchwork Sat Nov 2 21:04:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: CrazyCat X-Patchwork-Id: 3131691 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 186579F244 for ; Sat, 2 Nov 2013 21:10:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4963220320 for ; Sat, 2 Nov 2013 21:10:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3F1542031A for ; Sat, 2 Nov 2013 21:10:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753666Ab3KBVKf (ORCPT ); Sat, 2 Nov 2013 17:10:35 -0400 Received: from forward17.mail.yandex.net ([95.108.253.142]:40926 "EHLO forward17.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752037Ab3KBVKe (ORCPT ); Sat, 2 Nov 2013 17:10:34 -0400 X-Greylist: delayed 425 seconds by postgrey-1.27 at vger.kernel.org; Sat, 02 Nov 2013 17:10:34 EDT Received: from smtp16.mail.yandex.net (smtp16.mail.yandex.net [95.108.252.16]) by forward17.mail.yandex.net (Yandex) with ESMTP id 1FC0610600AC for ; Sun, 3 Nov 2013 01:04:55 +0400 (MSK) Received: from smtp16.mail.yandex.net (localhost [127.0.0.1]) by smtp16.mail.yandex.net (Yandex) with ESMTP id 00F016A02F7 for ; Sun, 3 Nov 2013 01:04:54 +0400 (MSK) Received: from 46-211-183-197-gprs.kyivstar.net (46-211-183-197-gprs.kyivstar.net [46.211.183.197]) by smtp16.mail.yandex.net (nwsmtp/Yandex) with ESMTP id WVTL4a54bU-4rd0WxNC; Sun, 3 Nov 2013 01:04:54 +0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=narod.ru; s=mail; t=1383426294; bh=/OYD0QC8Q2/x5YZxAyHujJ/zslPSt/bxQV244F4tVgE=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:Subject: Content-Type:Content-Transfer-Encoding; b=rXVuXKzY8xxe6dyM0Jt198SNrnkMVRMaS9J8Nk+raeH1so8SCVW6KK/rwYTwTmlPX l9W4JfPJ8+qtqXwTX3JlJwPkvkdPzIPnEd0nFuiuLtRD8d+4N5LuR+t4puSXPT66wK MdT2xl3v1/3xtpNQd+oYJ+cRGEyz/VemmKCunJlY= Authentication-Results: smtp16.mail.yandex.net; dkim=pass header.i=@narod.ru Message-ID: <527568E6.2000600@narod.ru> Date: Sat, 02 Nov 2013 23:04:38 +0200 From: CrazyCat User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:25.0) Gecko/20100101 Firefox/25.0 SeaMonkey/2.22 MIME-Version: 1.0 To: linux-media@vger.kernel.org Subject: [PATCH] cxd2820r_c: Fix if_ctl calculation 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.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_WEB,RP_MATCHES_RCVD, T_DKIM_INVALID,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 tune for DVB-C. Signed-off-by: Evgeny Plehov Acked-by: Antti Palosaari Reviewed-by: Antti Palosaari Tested-by: Antti Palosaari --- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/dvb-frontends/cxd2820r_c.c b/drivers/media/dvb-frontends/cxd2820r_c.c index 125a440..5c6ab49 100644 --- a/drivers/media/dvb-frontends/cxd2820r_c.c +++ b/drivers/media/dvb-frontends/cxd2820r_c.c @@ -78,7 +78,7 @@ int cxd2820r_set_frontend_c(struct dvb_frontend *fe) num = if_freq / 1000; /* Hz => kHz */ num *= 0x4000; - if_ctl = cxd2820r_div_u64_round_closest(num, 41000); + if_ctl = 0x4000 - cxd2820r_div_u64_round_closest(num, 41000); buf[0] = (if_ctl >> 8) & 0x3f; buf[1] = (if_ctl >> 0) & 0xff;