From patchwork Fri Mar 24 16:47:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jose Abreu X-Patchwork-Id: 9643349 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2496F602C9 for ; Fri, 24 Mar 2017 16:50:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1768620700 for ; Fri, 24 Mar 2017 16:50:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0C4DD26E48; Fri, 24 Mar 2017 16:50:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 890BC20700 for ; Fri, 24 Mar 2017 16:50:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966634AbdCXQuy (ORCPT ); Fri, 24 Mar 2017 12:50:54 -0400 Received: from us01smtprelay-2.synopsys.com ([198.182.47.9]:58509 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936880AbdCXQsh (ORCPT ); Fri, 24 Mar 2017 12:48:37 -0400 Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by smtprelay.synopsys.com (Postfix) with ESMTP id 4E3C824E2121; Fri, 24 Mar 2017 09:48:31 -0700 (PDT) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 39BCC930; Fri, 24 Mar 2017 09:48:31 -0700 (PDT) Received: from joabreu-VirtualBox.internal.synopsys.com (joabreu-e7440.internal.synopsys.com [10.107.19.88]) by mailhost.synopsys.com (Postfix) with ESMTP id D5106926; Fri, 24 Mar 2017 09:48:29 -0700 (PDT) From: Jose Abreu To: linux-media@vger.kernel.org Cc: hans.verkuil@cisco.com, mchehab@kernel.org, linux-kernel@vger.kernel.org, Jose Abreu Subject: [PATCH 5/8] [media] i2c: adv7604: Use cec_get_drvdata() Date: Fri, 24 Mar 2017 16:47:56 +0000 Message-Id: <0ed0990bceae6ed517eeb8744f4593cbeadce2ab.1490373499.git.joabreu@synopsys.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use helper function to get driver private data from CEC adapter. Signed-off-by: Jose Abreu Cc: Hans Verkuil --- drivers/media/i2c/adv7604.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c index d8bf435..f1fa9ce 100644 --- a/drivers/media/i2c/adv7604.c +++ b/drivers/media/i2c/adv7604.c @@ -2050,7 +2050,7 @@ static void adv76xx_cec_isr(struct v4l2_subdev *sd, bool *handled) static int adv76xx_cec_adap_enable(struct cec_adapter *adap, bool enable) { - struct adv76xx_state *state = adap->priv; + struct adv76xx_state *state = cec_get_drvdata(adap); struct v4l2_subdev *sd = &state->sd; if (!state->cec_enabled_adap && enable) { @@ -2080,7 +2080,7 @@ static int adv76xx_cec_adap_enable(struct cec_adapter *adap, bool enable) static int adv76xx_cec_adap_log_addr(struct cec_adapter *adap, u8 addr) { - struct adv76xx_state *state = adap->priv; + struct adv76xx_state *state = cec_get_drvdata(adap); struct v4l2_subdev *sd = &state->sd; unsigned int i, free_idx = ADV76XX_MAX_ADDRS; @@ -2135,7 +2135,7 @@ static int adv76xx_cec_adap_log_addr(struct cec_adapter *adap, u8 addr) static int adv76xx_cec_adap_transmit(struct cec_adapter *adap, u8 attempts, u32 signal_free_time, struct cec_msg *msg) { - struct adv76xx_state *state = adap->priv; + struct adv76xx_state *state = cec_get_drvdata(adap); struct v4l2_subdev *sd = &state->sd; u8 len = msg->len; unsigned int i;