From patchwork Sun Jan 11 23:05:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 5607491 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 50599C058D for ; Sun, 11 Jan 2015 23:02:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 74C0C20340 for ; Sun, 11 Jan 2015 23:02:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 263F820270 for ; Sun, 11 Jan 2015 23:02:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752495AbbAKXCY (ORCPT ); Sun, 11 Jan 2015 18:02:24 -0500 Received: from mail-we0-f180.google.com ([74.125.82.180]:55104 "EHLO mail-we0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752481AbbAKXCG (ORCPT ); Sun, 11 Jan 2015 18:02:06 -0500 Received: by mail-we0-f180.google.com with SMTP id w62so16316147wes.11 for ; Sun, 11 Jan 2015 15:02:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=pn88frDAx6tC7UvFNYlyTycj/JbLWe6ILJVSTGJ2ZJs=; b=KQ+rPEIe6fBoMxRv2tr9eO1bzZtUkTuO1vhi7RE98/C1JrxFbQB1wNlMNWSMH+/P41 QUCJBsxdrSyysw4Hr5Z81HTKisN9HcDBnfmDqy9r1frMitBV/J4jKSShyn1ScPGQvjR7 vbYB4JBPe/UnSJn0Kq4hHG/uW4D7akfmRYaiw37kd4Sn+vARMNZn0YD5p/do1z2R8hAb OrPzx+QfS/MaTG9bbQFBIzwbuHtbHkoxLs/wFyNhy4LfvcO+sUrfHNV6K6ZiocxFsgEQ XrhMNhDksBNscSajlucozYs1+S0xiaQ/qMpAFK0JsCs+4oRZj3PTZct12vGTGBmjEAoM OYDg== X-Gm-Message-State: ALoCoQnhLkvXQKLaAJwTolbNxP5z7LfSCEygd2t+ljQDSJAYHeGJIN3LJEF/L0ChPO2fVdYSt2SQ X-Received: by 10.180.75.176 with SMTP id d16mr24948254wiw.77.1421017324533; Sun, 11 Jan 2015 15:02:04 -0800 (PST) Received: from localhost.localdomain (h-246-111.a218.priv.bahnhof.se. [85.24.246.111]) by mx.google.com with ESMTPSA id h8sm4614115wiy.4.2015.01.11.15.02.03 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Jan 2015 15:02:03 -0800 (PST) From: Rickard Strandqvist To: Mauro Carvalho Chehab , linux-media@vger.kernel.org Cc: Rickard Strandqvist , linux-kernel@vger.kernel.org Subject: [PATCH] [media] usb: as102: as10x_cmd_cfg: Remove unused function Date: Mon, 12 Jan 2015 00:05:10 +0100 Message-Id: <1421017510-26243-1-git-send-email-rickard_strandqvist@spectrumdigital.se> X-Mailer: git-send-email 1.7.10.4 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 Remove the function as10x_cmd_eLNA_change_mode() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist --- drivers/media/usb/as102/as10x_cmd.h | 1 - drivers/media/usb/as102/as10x_cmd_cfg.c | 49 ------------------------------- 2 files changed, 50 deletions(-) diff --git a/drivers/media/usb/as102/as10x_cmd.h b/drivers/media/usb/as102/as10x_cmd.h index e06b84e..d87fc2f 100644 --- a/drivers/media/usb/as102/as10x_cmd.h +++ b/drivers/media/usb/as102/as10x_cmd.h @@ -518,6 +518,5 @@ int as10x_cmd_get_context(struct as10x_bus_adapter_t *adap, uint16_t tag, uint32_t *pvalue); -int as10x_cmd_eLNA_change_mode(struct as10x_bus_adapter_t *adap, uint8_t mode); int as10x_context_rsp_parse(struct as10x_cmd_t *prsp, uint16_t proc_id); #endif diff --git a/drivers/media/usb/as102/as10x_cmd_cfg.c b/drivers/media/usb/as102/as10x_cmd_cfg.c index c87f2ca..74def1f 100644 --- a/drivers/media/usb/as102/as10x_cmd_cfg.c +++ b/drivers/media/usb/as102/as10x_cmd_cfg.c @@ -130,55 +130,6 @@ out: } /** - * as10x_cmd_eLNA_change_mode - send eLNA change mode command to AS10x - * @adap: pointer to AS10x bus adapter - * @mode: mode selected: - * - ON : 0x0 => eLNA always ON - * - OFF : 0x1 => eLNA always OFF - * - AUTO : 0x2 => eLNA follow hysteresis parameters - * to be ON or OFF - * - * Return 0 on success or negative value in case of error. - */ -int as10x_cmd_eLNA_change_mode(struct as10x_bus_adapter_t *adap, uint8_t mode) -{ - int error; - struct as10x_cmd_t *pcmd, *prsp; - - pcmd = adap->cmd; - prsp = adap->rsp; - - /* prepare command */ - as10x_cmd_build(pcmd, (++adap->cmd_xid), - sizeof(pcmd->body.cfg_change_mode.req)); - - /* fill command */ - pcmd->body.cfg_change_mode.req.proc_id = - cpu_to_le16(CONTROL_PROC_ELNA_CHANGE_MODE); - pcmd->body.cfg_change_mode.req.mode = mode; - - /* send command */ - if (adap->ops->xfer_cmd) { - error = adap->ops->xfer_cmd(adap, (uint8_t *) pcmd, - sizeof(pcmd->body.cfg_change_mode.req) - + HEADER_SIZE, (uint8_t *) prsp, - sizeof(prsp->body.cfg_change_mode.rsp) - + HEADER_SIZE); - } else { - error = AS10X_CMD_ERROR; - } - - if (error < 0) - goto out; - - /* parse response */ - error = as10x_rsp_parse(prsp, CONTROL_PROC_ELNA_CHANGE_MODE_RSP); - -out: - return error; -} - -/** * as10x_context_rsp_parse - Parse context command response * @prsp: pointer to AS10x command response buffer * @proc_id: id of the command