From patchwork Tue Oct 17 21:13:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10012887 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 DDC95600CC for ; Tue, 17 Oct 2017 21:14:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D055528560 for ; Tue, 17 Oct 2017 21:14:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C576E286D2; Tue, 17 Oct 2017 21:14:40 +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 84C8A28560 for ; Tue, 17 Oct 2017 21:14:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A5EFC6E79B; Tue, 17 Oct 2017 21:14:26 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-io0-x22a.google.com (mail-io0-x22a.google.com [IPv6:2607:f8b0:4001:c06::22a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3A8B86E79B for ; Tue, 17 Oct 2017 21:14:26 +0000 (UTC) Received: by mail-io0-x22a.google.com with SMTP id 134so3821950ioo.0 for ; Tue, 17 Oct 2017 14:14:26 -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=FTxXKy2QnHkFQVGdaZCvnC91mgiWeZ/KNBGfoBfhCGw=; b=jkHw2mx0Bvk2n2g2jKgS00JHN90QDZUpHkwMGY9WIGbu0mfcbHa5MEjIfTpWmyxz2X EdkpsrmmTm2Ik30YG9jM+kkguCAgkBgJFl+dyl/0GSox4f7GvYiyo4jP4aRH4YV3kQ9T ZtTO/pSM0yFOCcsiA2sui8GQzZqNy3pwZnf98= 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=FTxXKy2QnHkFQVGdaZCvnC91mgiWeZ/KNBGfoBfhCGw=; b=G+ZbvPzXu2iH1LYGkxm/rDR8+Vh8L31Ujd+/YMagZ0GpY6tN5Dz7QfM8O3yCdrR5Wh 0iQog8VlWFXIjIWDxCP3JCrGOJTXS21EQUxNsLCtCjhWh+63cvjLscR6NsRMcRp8qrXi CSwSZY2nxNuZE4sNAFKp3VWPnOwLKOSYwPiTxwWUmt4vAkbt7mJMBJIs4v9c4WPa1NAK 4Prq/MAzGsDIqTaoK9A1ejHQCNA7JhiiRg6k+PuxzWLvHAKQ1jbSRoD238tC0ItbuuUJ JPxsnXM/InlcOCjSnzO4r3PFHfcBmBVgLjorKSnB2ku4870IVr+8VcOFJbYPRB4SvzZt vQbw== X-Gm-Message-State: AMCzsaUGIvt8Rw79PV0tAAx2AatBqQtrdap/2G5BEX3QRolJ8raA0ECu FFiL2hHHM4km1RrLp8hHnPKQHIckGqg= X-Google-Smtp-Source: ABhQp+RNsJNBd51vQwZICH8OSfChkwwp7ExKkh4X9LN9/UFYhxYjLjTWjDQKksjVntaI6P9vhNJatw== X-Received: by 10.107.17.68 with SMTP id z65mr13794190ioi.3.1508274865458; Tue, 17 Oct 2017 14:14:25 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:0:f685:3152:9ba1:429a]) by smtp.gmail.com with ESMTPSA id f2sm5220677ioj.73.2017.10.17.14.14.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Oct 2017 14:14:25 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org Subject: [PATCH v3 12/12] drm/panel: ls043t1le01: Remove enabled/prepared state Date: Tue, 17 Oct 2017 17:13:15 -0400 Message-Id: <20171017211321.7992-13-seanpaul@chromium.org> X-Mailer: git-send-email 2.15.0.rc1.287.g2b38de12cc-goog In-Reply-To: <20171017211321.7992-1-seanpaul@chromium.org> References: <20171017211321.7992-1-seanpaul@chromium.org> Cc: thierry.reding@gmail.com 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 --- No changes since v1 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; }