From patchwork Sat Dec 13 00:18:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Larsson X-Patchwork-Id: 5486081 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 20FCCBEEA8 for ; Sat, 13 Dec 2014 00:19:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6252E20204 for ; Sat, 13 Dec 2014 00:19:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B36922020F for ; Sat, 13 Dec 2014 00:19:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753888AbaLMAS5 (ORCPT ); Fri, 12 Dec 2014 19:18:57 -0500 Received: from smtp.bredband2.com ([83.219.192.166]:52967 "EHLO smtp.bredband2.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753869AbaLMASz (ORCPT ); Fri, 12 Dec 2014 19:18:55 -0500 Received: from localhost.localdomain (92-244-23-216.customers.ownit.se [92.244.23.216]) (Authenticated sender: ed8153) by smtp.bredband2.com (Postfix) with ESMTPA id DA37A99EE; Sat, 13 Dec 2014 01:18:45 +0100 (CET) From: Benjamin Larsson To: crope@iki.fi Cc: Linux Media Mailing List Subject: [PATCH 2/4] rtl28xxu: swap frontend order for devices with slave demodulators Date: Sat, 13 Dec 2014 01:18:43 +0100 Message-Id: <1418429925-16342-2-git-send-email-benjamin@southpole.se> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1418429925-16342-1-git-send-email-benjamin@southpole.se> References: <1418429925-16342-1-git-send-email-benjamin@southpole.se> 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 Signed-off-by: Benjamin Larsson --- drivers/media/usb/dvb-usb-v2/rtl28xxu.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c index ab48b5f..cdc342a 100644 --- a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c +++ b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c @@ -863,6 +863,7 @@ static int rtl2832u_frontend_attach(struct dvb_usb_adapter *adap) /* attach slave demodulator */ if (priv->slave_demod == SLAVE_DEMOD_MN88472) { + struct dvb_frontend *tmp_fe; struct mn88472_config mn88472_config = {}; mn88472_config.fe = &adap->fe[1]; @@ -887,6 +888,12 @@ static int rtl2832u_frontend_attach(struct dvb_usb_adapter *adap) } priv->i2c_client_slave_demod = client; + + /* Swap frontend order */ + tmp_fe = adap->fe[0]; + adap->fe[0] = adap->fe[1]; + adap->fe[1] = tmp_fe; + } else { struct mn88473_config mn88473_config = {}; @@ -1373,7 +1380,7 @@ static int rtl2832u_frontend_ctrl(struct dvb_frontend *fe, int onoff) /* bypass slave demod TS through master demod */ if (fe->id == 1 && onoff) { - ret = rtl2832_enable_external_ts_if(adap->fe[0]); + ret = rtl2832_enable_external_ts_if(adap->fe[1]); if (ret) goto err; }