From patchwork Mon Aug 3 19:09:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 6932701 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 DA93B9F358 for ; Mon, 3 Aug 2015 19:10:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 14946205D1 for ; Mon, 3 Aug 2015 19:10:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3E01820632 for ; Mon, 3 Aug 2015 19:10:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754823AbbHCTKM (ORCPT ); Mon, 3 Aug 2015 15:10:12 -0400 Received: from mail-yk0-f177.google.com ([209.85.160.177]:35143 "EHLO mail-yk0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754650AbbHCTKK (ORCPT ); Mon, 3 Aug 2015 15:10:10 -0400 Received: by ykdu72 with SMTP id u72so118814948ykd.2 for ; Mon, 03 Aug 2015 12:10:10 -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=wihnN0xx7TVZorZzoFHIW3nRms0coAeyxOSp2lLx9aQ=; b=Ru88NQhkKgs3j1pKCoGKsVuYOLT7dBZhJfnu8cfJbLfkO3Sv3/VB8HrCvJbqXrG1xP 1wl9S79x8CCGAnyvR0HD61fyCuSKODtE3kMCfflf8qKS92zrz/Gcqtk43OZlPUeoZjcG Gn9d5D8LuX7XKObAVDGfbTo7rVomtmZMpQAJo9tYdj1ierXmu1t60Uh41hSOR4gHbXyw Td9Pwn80k+nquHYO7guDcAIs6Wksrjic747Y/nYDmI/X0UVrbdOmbKjeBTX2dv/VVV47 8hG7PSlhkL1jKr5fPhfTIKa82UPofqwjkkYDSlQPC20DlhktVm8xLri2M3osgS7j1Aj9 EIQg== X-Received: by 10.170.94.84 with SMTP id l81mr22433546yka.93.1438629009980; Mon, 03 Aug 2015 12:10:09 -0700 (PDT) Received: from jade.localdomain ([187.64.235.140]) by smtp.gmail.com with ESMTPSA id i130sm15006226ywb.21.2015.08.03.12.10.07 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Aug 2015 12:10:08 -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 02/11] drm/exynos: remove wrappers for phy_power_{on,off} Date: Mon, 3 Aug 2015 16:09:49 -0300 Message-Id: <1438628998-3435-3-git-send-email-gustavo@padovan.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1438628998-3435-1-git-send-email-gustavo@padovan.org> References: <1438628998-3435-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.1 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 f2cc8f1..fe38d6f 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); @@ -1105,7 +1093,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) @@ -1278,7 +1266,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);