From patchwork Thu Oct 12 17:55:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10002475 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 32C8160216 for ; Thu, 12 Oct 2017 17:57:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 26AB428E57 for ; Thu, 12 Oct 2017 17:57:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1B8B628E5D; Thu, 12 Oct 2017 17:57:03 +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 4A9E028E57 for ; Thu, 12 Oct 2017 17:56:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6D6CC6E90F; Thu, 12 Oct 2017 17:56:52 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qt0-x22c.google.com (mail-qt0-x22c.google.com [IPv6:2607:f8b0:400d:c0d::22c]) by gabe.freedesktop.org (Postfix) with ESMTPS id D66586E90F for ; Thu, 12 Oct 2017 17:56:50 +0000 (UTC) Received: by mail-qt0-x22c.google.com with SMTP id o52so15122395qtc.9 for ; Thu, 12 Oct 2017 10:56:50 -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=U+huGf1LOrEPDA/77PMzr9rDJh9MUf6H2SXdbUa2ugQ=; b=j/2cgRitAR78lEYGsbPu6WWnYwPBVLyHX5Xd7M8V/S2788q1WsLk/M0y2YAGes8IAi xSgPKxT1F27Z/fS2fqJQoEEuzEOvQHWh6ze/aeBBiBgtxEDQFxBTK5e4cAJSVw3x1Vz0 X6q8kc9Rr1e2BPPShnFe7Ei2weuANUN03g0xA= 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=U+huGf1LOrEPDA/77PMzr9rDJh9MUf6H2SXdbUa2ugQ=; b=hdjGxdnii6F3tjZTSfsZti8mLzpuReLIas69oTxvlMEiWwVKjbXMhq9owYDJ0TF4pf 5lUslPY+waZDvcetoz1WWL8S751aZESorznhb+disGSXSJ0pHNU4AkE0CzWE2Rhzyvji tkZG3z9h0ppmBJ81h+TGYi5I2hyBSmWXoB0QOGEPQug3kWtJ8JngRMMSLnzksXhTVTEi ELJyhit7sAyE4ZesWc9wp0UQOwg9VxfM5hpGt2L6fqrO7lVyjZD6kBPY1K9HPNkreghw DsiBfbXWEu/dl6PhjQjYNWspoglMDxtpWkUV1GEYTz8+W+F3DV3BBu0hiYDTZs3Rcujx E/5A== X-Gm-Message-State: AMCzsaX4OIVI+ObzOYkAr4ZuSIhGT8xbbsTWOcmtLV7OLc1utZo8A84n SzEzsDkZ846xEwne+VMCUKdtijp+9QM= X-Google-Smtp-Source: AOwi7QCL415oTNHtRZhY8Mw2hE9x7x4ItCkZgEeQrwv70umqB8ckoJFggYV5YEQnkkcwCs4fxX6GMA== X-Received: by 10.37.209.136 with SMTP id i130mr2275559ybg.505.1507831006013; Thu, 12 Oct 2017 10:56:46 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:0:f685:3152:9ba1:429a]) by smtp.gmail.com with ESMTPSA id x140sm5853087ywd.60.2017.10.12.10.56.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Oct 2017 10:56:45 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org Subject: [PATCH v2 10/10] drm/panel: ls043t1le01: Remove enabled/prepared state Date: Thu, 12 Oct 2017 13:55:37 -0400 Message-Id: <20171012175546.21323-11-seanpaul@chromium.org> X-Mailer: git-send-email 2.15.0.rc0.271.g36b669edcc-goog In-Reply-To: <20171012175546.21323-1-seanpaul@chromium.org> References: <20171012175546.21323-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 --- 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; }