From patchwork Thu Sep 21 17:06:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 9964425 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F00C56020C for ; Thu, 21 Sep 2017 17:07:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DC4F2294DE for ; Thu, 21 Sep 2017 17:07:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D171729526; Thu, 21 Sep 2017 17:07:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 876E1294DE for ; Thu, 21 Sep 2017 17:07:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D33B96E89D; Thu, 21 Sep 2017 17:07:46 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf0-x234.google.com (mail-pf0-x234.google.com [IPv6:2607:f8b0:400e:c00::234]) by gabe.freedesktop.org (Postfix) with ESMTPS id 608DC6E8C0 for ; Thu, 21 Sep 2017 17:07:45 +0000 (UTC) Received: by mail-pf0-x234.google.com with SMTP id p87so3503296pfj.9 for ; Thu, 21 Sep 2017 10:07:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=KpWIQz6Oyk1skrM2cE5j9UW0woFzo6xEMy5zrXNsxWI=; b=PmZ+KCOJqKCsahZi9nYdTvIxbKHuxLPzSpKN62G3/6jife3uUhtv9FdHQTERjXfV0i 1KLzY00HWyLUuCQTk/A1fMmwImdRm3Ie5zPxXJVc4lYlXXL54nXudqxspONoTxct8Rec hK+VnTcMVju9gT/bA97uGau2M+j1CorwjBYZ0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=KpWIQz6Oyk1skrM2cE5j9UW0woFzo6xEMy5zrXNsxWI=; b=LTu59N9LYzziXrDEJoC+m2UztwsIlCk7RfXTJPSkEsXoASns8R9w2ymK5KIB6Ii5wF qc2uW+hH1+STD3LZgtgjnwn47E+bawnRZko2SsMGdyztWKaa1Nj6ib1/T4xtK7ac5jDX /SjqrHnre9Yz/YsJcRFgswpUcgbDUq2lpznhJYgiioS8cYqBPjrxsFQE44V0nOf0irwo mw3b3uJvOtxD8L4tbVkqbjm3NbjHsIiC27L2rW763C4fj5POaq5oQfhRgcKyXMEBY23u vOy/SXssemSWIUSvF2x6yOHbWWIm0bMeV2UKYH8aq3GLUNPhtgbLsKzBsggHNtF/S8EZ LUtA== X-Gm-Message-State: AHPjjUg3XVBWLI12VnLXZRBgjtKFOtnjZiiWAiF7ff7sOmokPAEljcVh iDNM0/piuP+RPYUu0/b4q5xvfAMK9jE= X-Google-Smtp-Source: AOwi7QD5G5rLbMh6Wu7/oFNKDmmUeMcFiwoIsvWqeK2Qw6weFNGcCCRPqpgVax5Qkq1RFr7k6ukl7w== X-Received: by 10.98.53.196 with SMTP id c187mr6498835pfa.38.1506013664735; Thu, 21 Sep 2017 10:07:44 -0700 (PDT) Received: from trickycodes.corp.google.com ([172.19.15.95]) by smtp.gmail.com with ESMTPSA id l86sm3317481pfg.155.2017.09.21.10.07.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 Sep 2017 10:07:44 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org Subject: [PATCH 10/10] drm/panel: ls043t1le01: Remove enabled/prepared state Date: Thu, 21 Sep 2017 10:06:21 -0700 Message-Id: <20170921170638.27031-11-seanpaul@chromium.org> X-Mailer: git-send-email 2.14.1.821.g8fa685d3b7-goog In-Reply-To: <20170921170638.27031-1-seanpaul@chromium.org> References: <20170921170638.27031-1-seanpaul@chromium.org> Cc: Thierry Reding X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP They're not necessary for atomic drivers, and drm_panel will WARN if the calls are unbalanced Signed-off-by: Sean Paul --- drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c b/drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c index 3aeb0bda4947..8d7843248556 100644 --- a/drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c +++ b/drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c @@ -39,9 +39,6 @@ struct sharp_nt_panel { struct regulator *supply; struct gpio_desc *reset_gpio; - bool prepared; - bool enabled; - const struct drm_display_mode *mode; }; @@ -114,16 +111,11 @@ static int sharp_nt_panel_disable(struct drm_panel *panel) { struct sharp_nt_panel *sharp_nt = to_sharp_nt_panel(panel); - if (!sharp_nt->enabled) - return 0; - if (sharp_nt->backlight) { sharp_nt->backlight->props.power = FB_BLANK_POWERDOWN; backlight_update_status(sharp_nt->backlight); } - sharp_nt->enabled = false; - return 0; } @@ -132,9 +124,6 @@ static int sharp_nt_panel_unprepare(struct drm_panel *panel) struct sharp_nt_panel *sharp_nt = to_sharp_nt_panel(panel); int ret; - if (!sharp_nt->prepared) - return 0; - ret = sharp_nt_panel_off(sharp_nt); if (ret < 0) { dev_err(panel->dev, "failed to set panel off: %d\n", ret); @@ -145,8 +134,6 @@ static int sharp_nt_panel_unprepare(struct drm_panel *panel) if (sharp_nt->reset_gpio) gpiod_set_value(sharp_nt->reset_gpio, 0); - sharp_nt->prepared = false; - return 0; } @@ -155,9 +142,6 @@ static int sharp_nt_panel_prepare(struct drm_panel *panel) struct sharp_nt_panel *sharp_nt = to_sharp_nt_panel(panel); int ret; - if (sharp_nt->prepared) - return 0; - ret = regulator_enable(sharp_nt->supply); if (ret < 0) return ret; @@ -185,8 +169,6 @@ static int sharp_nt_panel_prepare(struct drm_panel *panel) goto poweroff; } - sharp_nt->prepared = true; - return 0; poweroff: @@ -200,16 +182,11 @@ static int sharp_nt_panel_enable(struct drm_panel *panel) { struct sharp_nt_panel *sharp_nt = to_sharp_nt_panel(panel); - if (sharp_nt->enabled) - return 0; - if (sharp_nt->backlight) { sharp_nt->backlight->props.power = FB_BLANK_UNBLANK; backlight_update_status(sharp_nt->backlight); } - sharp_nt->enabled = true; - return 0; }