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: 5557671 Return-Path: X-Original-To: patchwork-linux-arm@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 DA077BF6C3 for ; Thu, 1 Jan 2015 19:14:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EE77420220 for ; Thu, 1 Jan 2015 19:14:48 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0EFA62021B for ; Thu, 1 Jan 2015 19:14:48 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Y6l9z-0003tp-JM; Thu, 01 Jan 2015 19:11:51 +0000 Received: from mail-wi0-f175.google.com ([209.85.212.175]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Y6l9w-0003qo-3Y for linux-arm-kernel@lists.infradead.org; Thu, 01 Jan 2015 19:11:48 +0000 Received: by mail-wi0-f175.google.com with SMTP id l15so26918152wiw.8 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=S1Hj1t3Akg3MTTA1qnudDSroAMAxaHSTRBgPDnY67HqqJu7Rn0AUTJIRffWm9IJme3 Hf2RIBn4Pe5fuHhMAe/Up42gar3ZayMFNQeQdLq7K4PnhKLfWmrQ1pZOS2/Cw04bPpFA p+w3FkX0hc/PuuH0uhGiafeCm7PPteLleT71UByj0q0ZzNppSimK0V1DNV0SpT5T05nH m2Umx9N1tViuyibZItSGkwfoDkUWcvzzpQG58lYPvzlwcmkW/VokxrsGdzihnbMsr6E5 VaoFH461HnqEjwyk4xT2yUGTMMccfREsA8SxtLxgBaf4Gxs/NufkiNJyQ8EXXDhyyDj9 8XvA== X-Gm-Message-State: ALoCoQnB8TjHPldixQTKDruv3IQ6FFbx1ouHkQYi+CEEucAhwiqZ0BXeyEeWUokQThc7Pds0G1Mh 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150101_111148_305646_C87029A3 X-CRM114-Status: GOOD ( 11.47 ) X-Spam-Score: -0.7 (/) Cc: linux-fbdev@vger.kernel.org, Kukjin Kim , Rickard Strandqvist , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Kyungmin Park , Tomi Valkeinen , Jean-Christophe Plagniol-Villard , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 */