From patchwork Fri Mar 24 16:47:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jose Abreu X-Patchwork-Id: 9643353 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 70F3C602C9 for ; Fri, 24 Mar 2017 16:51:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6446920700 for ; Fri, 24 Mar 2017 16:51:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5926026E48; Fri, 24 Mar 2017 16:51:17 +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=unavailable 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 B786325404 for ; Fri, 24 Mar 2017 16:51:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936869AbdCXQsb (ORCPT ); Fri, 24 Mar 2017 12:48:31 -0400 Received: from smtprelay.synopsys.com ([198.182.47.9]:58500 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936859AbdCXQs2 (ORCPT ); Fri, 24 Mar 2017 12:48:28 -0400 Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by smtprelay.synopsys.com (Postfix) with ESMTP id 0381C24E0C76; Fri, 24 Mar 2017 09:48:26 -0700 (PDT) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id E2012911; Fri, 24 Mar 2017 09:48:25 -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 69E9F910; Fri, 24 Mar 2017 09:48:24 -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 , Benjamin Gaignard Subject: [PATCH 2/8] [media] staging: st-cec: Use cec_get_drvdata() Date: Fri, 24 Mar 2017 16:47:53 +0000 Message-Id: <4630ddce3d8ca27e4f6addeda17e11b08f345a1a.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: Benjamin Gaignard --- drivers/staging/media/st-cec/stih-cec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/media/st-cec/stih-cec.c b/drivers/staging/media/st-cec/stih-cec.c index 3c25638..521206d 100644 --- a/drivers/staging/media/st-cec/stih-cec.c +++ b/drivers/staging/media/st-cec/stih-cec.c @@ -133,7 +133,7 @@ struct stih_cec { static int stih_cec_adap_enable(struct cec_adapter *adap, bool enable) { - struct stih_cec *cec = adap->priv; + struct stih_cec *cec = cec_get_drvdata(adap); if (enable) { /* The doc says (input TCLK_PERIOD * CEC_CLK_DIV) = 0.1ms */ @@ -189,7 +189,7 @@ static int stih_cec_adap_enable(struct cec_adapter *adap, bool enable) static int stih_cec_adap_log_addr(struct cec_adapter *adap, u8 logical_addr) { - struct stih_cec *cec = adap->priv; + struct stih_cec *cec = cec_get_drvdata(adap); u32 reg = readl(cec->regs + CEC_ADDR_TABLE); reg |= 1 << logical_addr; @@ -205,7 +205,7 @@ static int stih_cec_adap_log_addr(struct cec_adapter *adap, u8 logical_addr) static int stih_cec_adap_transmit(struct cec_adapter *adap, u8 attempts, u32 signal_free_time, struct cec_msg *msg) { - struct stih_cec *cec = adap->priv; + struct stih_cec *cec = cec_get_drvdata(adap); int i; /* Copy message into registers */