From patchwork Wed Aug 5 23:24:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 6954851 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 CE9C49F39D for ; Wed, 5 Aug 2015 23:24:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EE65620663 for ; Wed, 5 Aug 2015 23:24:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9EB3F2065E for ; Wed, 5 Aug 2015 23:24:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751482AbbHEXYf (ORCPT ); Wed, 5 Aug 2015 19:24:35 -0400 Received: from mail-yk0-f179.google.com ([209.85.160.179]:36404 "EHLO mail-yk0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751305AbbHEXYe (ORCPT ); Wed, 5 Aug 2015 19:24:34 -0400 Received: by ykeo23 with SMTP id o23so48824442yke.3 for ; Wed, 05 Aug 2015 16:24:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+qf5h5M0pXMXiQUcCarWlDqfog2AmHyY5PRk+StIZHU=; b=EdXjpbrxoNI0eLS8REm6Vb5FJLbozB8Q6nGB7YInwyiNnTFMPAnELeMRGGRbovbdnS e0XeMQVo040mG11Va/HeIRf3J7Qhp2IXNM+7Os55368gQ4nqtwtPp2V1AiWCXGbcUr5o os6R6/WuUUkUUZE2UTD7zepg73DBiRgzvUEP3H+lmGm4qlu9xWSbZY71O1c24wDweWyh /EeTblPs1Q0mFViJau2t7Jgm9IV7Go5nUFk1NpDmjJjaIrYxkbEBDVEd1rEQl8JqD1DH VWLQpODlXGqEQ97GX1yBwEpnZKmRDzhjPzp0u5ZdVHWDLCdZFVHN4DbEDe86ogssV4br ZwRA== X-Received: by 10.129.79.213 with SMTP id d204mr11828990ywb.159.1438817074232; Wed, 05 Aug 2015 16:24:34 -0700 (PDT) Received: from jade.localdomain ([187.64.235.140]) by smtp.gmail.com with ESMTPSA id u186sm4327588ywa.4.2015.08.05.16.24.29 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Aug 2015 16:24:31 -0700 (PDT) From: Gustavo Padovan To: linux-samsung-soc@vger.kernel.org Cc: dri-devel@lists.freedesktop.org, inki.dae@samsung.com, jy0922.shim@samsung.com, tjakobi@math.uni-bielefeld.de, Gustavo Padovan Subject: [PATCH v2 02/11] drm/exynos: remove wrappers for phy_power_{on, off} Date: Wed, 5 Aug 2015 20:24:13 -0300 Message-Id: <1438817060-22164-3-git-send-email-gustavo@padovan.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1438817060-22164-1-git-send-email-gustavo@padovan.org> References: <1438817060-22164-1-git-send-email-gustavo@padovan.org> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, TVD_SUBJ_WIPE_DEBT, 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 From: Gustavo Padovan phy_power_on() and phy_power_off() already checks for NULL pointer. This patch removes the wrappers exynos_dp_phy_init() and exynos_dp_phy_exit() since the only think they were doing was a check for NULL phy. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/exynos/exynos_dp_core.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_dp_core.c b/drivers/gpu/drm/exynos/exynos_dp_core.c index b3bf210..54f91e7 100644 --- a/drivers/gpu/drm/exynos/exynos_dp_core.c +++ b/drivers/gpu/drm/exynos/exynos_dp_core.c @@ -1054,18 +1054,6 @@ static int exynos_dp_create_connector(struct exynos_drm_display *display, return ret; } -static void exynos_dp_phy_init(struct exynos_dp_device *dp) -{ - if (dp->phy) - phy_power_on(dp->phy); -} - -static void exynos_dp_phy_exit(struct exynos_dp_device *dp) -{ - if (dp->phy) - phy_power_off(dp->phy); -} - static void exynos_dp_enable(struct exynos_drm_display *display) { struct exynos_dp_device *dp = display_to_dp(display); @@ -1085,7 +1073,7 @@ static void exynos_dp_enable(struct exynos_drm_display *display) crtc->ops->clock_enable(dp_to_crtc(dp), true); clk_prepare_enable(dp->clock); - exynos_dp_phy_init(dp); + phy_power_on(dp->phy); exynos_dp_init_dp(dp); enable_irq(dp->irq); exynos_dp_commit(&dp->display); @@ -1108,7 +1096,7 @@ static void exynos_dp_disable(struct exynos_drm_display *display) disable_irq(dp->irq); flush_work(&dp->hotplug_work); - exynos_dp_phy_exit(dp); + phy_power_off(dp->phy); clk_disable_unprepare(dp->clock); if (crtc->ops->clock_enable) @@ -1281,7 +1269,7 @@ static int exynos_dp_bind(struct device *dev, struct device *master, void *data) INIT_WORK(&dp->hotplug_work, exynos_dp_hotplug); - exynos_dp_phy_init(dp); + phy_power_on(dp->phy); exynos_dp_init_dp(dp);