From patchwork Wed Jun 3 11:34:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 6534591 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BA0129F3D1 for ; Wed, 3 Jun 2015 11:34:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E14782065B for ; Wed, 3 Jun 2015 11:34:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0FBFC2061E for ; Wed, 3 Jun 2015 11:34:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751904AbbFCLeS (ORCPT ); Wed, 3 Jun 2015 07:34:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33562 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751862AbbFCLeQ (ORCPT ); Wed, 3 Jun 2015 07:34:16 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id DCE608E68F; Wed, 3 Jun 2015 11:34:16 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-112-71.phx2.redhat.com [10.3.112.71]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t53BYDoi023256; Wed, 3 Jun 2015 07:34:15 -0400 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 Subject: [PATCH] ts2020: Copy loop_through from the config to the internal data From: David Howells To: crope@iki.fi Cc: dhowells@redhat.com, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Date: Wed, 03 Jun 2015 12:34:13 +0100 Message-ID: <20150603113413.31994.35192.stgit@warthog.procyon.org.uk> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Copy the loop_through setting from the ts2020_config struct to the internal ts2020_priv struct so that it can actually be used. Whilst we're at it, group the bitfields together in the same order in both structs so that the compiler has a good chance to copy them in one go. Signed-off-by: David Howells --- drivers/media/dvb-frontends/ts2020.c | 3 ++- drivers/media/dvb-frontends/ts2020.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) -- 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/ts2020.c b/drivers/media/dvb-frontends/ts2020.c index 80ae039..8c997d0 100644 --- a/drivers/media/dvb-frontends/ts2020.c +++ b/drivers/media/dvb-frontends/ts2020.c @@ -37,6 +37,7 @@ struct ts2020_priv { /* i2c details */ struct i2c_adapter *i2c; int i2c_address; + bool loop_through:1; u8 clk_out:2; u8 clk_out_div:5; u32 frequency_div; /* LO output divider switch frequency */ @@ -44,7 +45,6 @@ struct ts2020_priv { #define TS2020_M88TS2020 0 #define TS2020_M88TS2022 1 u8 tuner; - u8 loop_through:1; }; struct ts2020_reg_val { @@ -582,6 +582,7 @@ static int ts2020_probe(struct i2c_client *client, dev->i2c = client->adapter; dev->i2c_address = client->addr; + dev->loop_through = pdata->loop_through; dev->clk_out = pdata->clk_out; dev->clk_out_div = pdata->clk_out_div; dev->frequency_div = pdata->frequency_div; diff --git a/drivers/media/dvb-frontends/ts2020.h b/drivers/media/dvb-frontends/ts2020.h index 3779724..002bc0a 100644 --- a/drivers/media/dvb-frontends/ts2020.h +++ b/drivers/media/dvb-frontends/ts2020.h @@ -32,7 +32,7 @@ struct ts2020_config { /* * RF loop-through */ - u8 loop_through:1; + bool loop_through:1; /* * clock output