From patchwork Mon Jul 6 14:20:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 6724921 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 3E074C05AD for ; Mon, 6 Jul 2015 14:21:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 74402206CC for ; Mon, 6 Jul 2015 14:21:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 285632070E for ; Mon, 6 Jul 2015 14:21:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753127AbbGFOVQ (ORCPT ); Mon, 6 Jul 2015 10:21:16 -0400 Received: from mail-qg0-f44.google.com ([209.85.192.44]:36055 "EHLO mail-qg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753097AbbGFOVQ (ORCPT ); Mon, 6 Jul 2015 10:21:16 -0400 Received: by qgeg89 with SMTP id g89so69538484qge.3 for ; Mon, 06 Jul 2015 07:21:15 -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=KBZU1yqk6lqvzg+5+mQOpHkWSy30On1gfk+3Kvn/RcbBmYWwsF5betnCIZAwuu+bbc r0n9U0tCKdxuPGn4uYS9OVeogsK3Zh6t2pfJbOLHH//RAldjdSlQcIDQCefftyro8k7i LfQ5bvW93+8kBY+nKYYOTLH6mYXbVlP/DlrQonWzuquRhgqhWPdED14OjZKOSdMGFiYj 4GAltIC7XsV0hwKthppsL7UaGRNSYxetAMjKVxSUBofwGfoz31t3QTtleINo8aa5zp1H 6wg46TpkGDSP/XGS4QAyW3bAK3isAhyNNUWFHiAK8ad0/cwEBdfCcjuU4ynHiexW+VkN 063Q== X-Received: by 10.140.194.13 with SMTP id p13mr76343090qha.50.1436192475589; Mon, 06 Jul 2015 07:21:15 -0700 (PDT) Received: from jade.localdomain ([191.255.48.48]) by mx.google.com with ESMTPSA id f207sm1707424qhc.41.2015.07.06.07.21.12 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Jul 2015 07:21:15 -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 14/23] drm/exynos: remove wrappers for phy_power_{on, off} Date: Mon, 6 Jul 2015 11:20:15 -0300 Message-Id: <1436192424-18194-15-git-send-email-gustavo@padovan.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1436192424-18194-1-git-send-email-gustavo@padovan.org> References: <1436192424-18194-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.6 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);