From patchwork Thu Jan 1 19:14:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 5557611 Return-Path: X-Original-To: patchwork-linux-fbdev@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 50D7F9F2ED for ; Thu, 1 Jan 2015 19:11:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 37B712022D for ; Thu, 1 Jan 2015 19:11:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0ADD92021B for ; Thu, 1 Jan 2015 19:11:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751570AbbAATL0 (ORCPT ); Thu, 1 Jan 2015 14:11:26 -0500 Received: from mail-wg0-f52.google.com ([74.125.82.52]:54999 "EHLO mail-wg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751161AbbAATLZ (ORCPT ); Thu, 1 Jan 2015 14:11:25 -0500 Received: by mail-wg0-f52.google.com with SMTP id x12so23391003wgg.39 for ; Thu, 01 Jan 2015 11:11:23 -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=6777OJhS+mwcuVcCpIS6+xKB1+IdsjDoyV7gMYADnis=; b=PtOxgxp9JBDiUZxW64WOEbguPwxKXsHxe7PWTMo7unNLNvUkrzZgaMxYrWgOLRzYhw UxQCCk3Bq1C7E4aXeLO84zOTa6itDaACDVtC+MexroocIVFD6snLFie4bnNb3dM/Y8/u +XgmdoyxXVEdjubCHzVfOmdpbtUVNzLyajVSzuxgwQblITIVWT+4mXH3de8g38XzbiS6 n5GwX2afuHjbZK9zaQXmvCpqI/Vut3/4DQLN6xJ0DzPhLCHErnB1Wi7OtBaObtMfHp4q Ma5CQa/kwwEOPM3+YbcM6xq6fHl99si4NYFIsAtnXJL1s9/I3l5FPppPAWCPdiZFbEaB eofA== X-Gm-Message-State: ALoCoQnRvTkr339zQ474bQMsL1U8r4KDdbULwsNjprzo+6UzWjn39H4lIO2cITihOBw29kKEv3mq X-Received: by 10.180.216.36 with SMTP id on4mr124482149wic.27.1420139483776; Thu, 01 Jan 2015 11:11:23 -0800 (PST) Received: from localhost.localdomain (h-246-111.a218.priv.bahnhof.se. [85.24.246.111]) by mx.google.com with ESMTPSA id qd2sm51593851wic.19.2015.01.01.11.11.22 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Jan 2015 11:11:23 -0800 (PST) From: Rickard Strandqvist To: Inki Dae , Donghwa Lee Cc: Rickard Strandqvist , Kyungmin Park , Jean-Christophe Plagniol-Villard , Tomi Valkeinen , Kukjin Kim , linux-fbdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] video: fbdev: exynos: exynos_mipi_dsi_common: Remove some unused functions Date: Thu, 1 Jan 2015 20:14:24 +0100 Message-Id: <1420139664-3008-1-git-send-email-rickard_strandqvist@spectrumdigital.se> X-Mailer: git-send-email 1.7.10.4 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@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 Removes some functions that are not used anywhere: exynos_mipi_dsi_fifo_clear() exynos_mipi_dsi_set_data_transfer_mode() exynos_mipi_dsi_enable_frame_done_int() This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist --- .../video/fbdev/exynos/exynos_mipi_dsi_common.c | 53 -------------------- .../video/fbdev/exynos/exynos_mipi_dsi_common.h | 7 --- 2 files changed, 60 deletions(-) diff --git a/drivers/video/fbdev/exynos/exynos_mipi_dsi_common.c b/drivers/video/fbdev/exynos/exynos_mipi_dsi_common.c index 85edabf..d7b4abc 100644 --- a/drivers/video/fbdev/exynos/exynos_mipi_dsi_common.c +++ b/drivers/video/fbdev/exynos/exynos_mipi_dsi_common.c @@ -690,15 +690,6 @@ void exynos_mipi_dsi_init_interrupt(struct mipi_dsim_device *dsim) exynos_mipi_dsi_set_interrupt_mask(dsim, src, 1); } -int exynos_mipi_dsi_enable_frame_done_int(struct mipi_dsim_device *dsim, - unsigned int enable) -{ - /* enable only frame done interrupt */ - exynos_mipi_dsi_set_interrupt_mask(dsim, INTMSK_FRAME_DONE, enable); - - return 0; -} - void exynos_mipi_dsi_stand_by(struct mipi_dsim_device *dsim, unsigned int enable) { @@ -819,30 +810,6 @@ int exynos_mipi_dsi_set_hs_enable(struct mipi_dsim_device *dsim) return 0; } -int exynos_mipi_dsi_set_data_transfer_mode(struct mipi_dsim_device *dsim, - unsigned int mode) -{ - if (mode) { - if (dsim->state != DSIM_STATE_HSCLKEN) { - dev_err(dsim->dev, "HS Clock lane is not enabled.\n"); - return -EINVAL; - } - - exynos_mipi_dsi_set_lcdc_transfer_mode(dsim, 0); - } else { - if (dsim->state == DSIM_STATE_INIT || dsim->state == - DSIM_STATE_ULPS) { - dev_err(dsim->dev, - "DSI Master is not STOP or HSDT state.\n"); - return -EINVAL; - } - - exynos_mipi_dsi_set_cpu_transfer_mode(dsim, 0); - } - - return 0; -} - int exynos_mipi_dsi_get_frame_done_status(struct mipi_dsim_device *dsim) { return _exynos_mipi_dsi_get_frame_done_status(dsim); @@ -855,26 +822,6 @@ int exynos_mipi_dsi_clear_frame_done(struct mipi_dsim_device *dsim) return 0; } -int exynos_mipi_dsi_fifo_clear(struct mipi_dsim_device *dsim, - unsigned int val) -{ - int try = TRY_FIFO_CLEAR; - - exynos_mipi_dsi_sw_reset_release(dsim); - exynos_mipi_dsi_func_reset(dsim); - - do { - if (exynos_mipi_dsi_get_sw_reset_release(dsim)) { - exynos_mipi_dsi_init_interrupt(dsim); - dev_dbg(dsim->dev, "reset release done.\n"); - return 0; - } - } while (--try); - - dev_err(dsim->dev, "failed to clear dsim fifo.\n"); - return -EAGAIN; -} - MODULE_AUTHOR("InKi Dae "); MODULE_DESCRIPTION("Samusung SoC MIPI-DSI common driver"); MODULE_LICENSE("GPL"); diff --git a/drivers/video/fbdev/exynos/exynos_mipi_dsi_common.h b/drivers/video/fbdev/exynos/exynos_mipi_dsi_common.h index 4125522..5c1c30b 100644 --- a/drivers/video/fbdev/exynos/exynos_mipi_dsi_common.h +++ b/drivers/video/fbdev/exynos/exynos_mipi_dsi_common.h @@ -31,16 +31,9 @@ int exynos_mipi_dsi_set_display_mode(struct mipi_dsim_device *dsim, struct mipi_dsim_config *dsim_info); int exynos_mipi_dsi_init_link(struct mipi_dsim_device *dsim); int exynos_mipi_dsi_set_hs_enable(struct mipi_dsim_device *dsim); -int exynos_mipi_dsi_set_data_transfer_mode(struct mipi_dsim_device *dsim, - unsigned int mode); -int exynos_mipi_dsi_enable_frame_done_int(struct mipi_dsim_device *dsim, - unsigned int enable); int exynos_mipi_dsi_get_frame_done_status(struct mipi_dsim_device *dsim); int exynos_mipi_dsi_clear_frame_done(struct mipi_dsim_device *dsim); extern struct fb_info *registered_fb[FB_MAX] __read_mostly; -int exynos_mipi_dsi_fifo_clear(struct mipi_dsim_device *dsim, - unsigned int val); - #endif /* _EXYNOS_MIPI_DSI_COMMON_H */