Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751936AbeAPKgL (ORCPT + 1 other); Tue, 16 Jan 2018 05:36:11 -0500 Received: from mail-io0-f193.google.com ([209.85.223.193]:37171 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750852AbeAPKgJ (ORCPT ); Tue, 16 Jan 2018 05:36:09 -0500 X-Google-Smtp-Source: ACJfBouzbaP2UdHpcsQBEhaWL4TimqS3fJCFpUOznJNJEffQb0Z/nZX1KNr9sqENPTGxhx/BtgBcCA== Date: Tue, 16 Jan 2018 10:35:57 +0000 From: Meghana Madhyastha To: Lee Jones , Daniel Thompson , Jingoo Han , Thierry Reding , Noralf =?iso-8859-1?Q?Tr=F8nnes?= , Tomi Valkeinen , Daniel Vetter , Sean Paul , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v16 08/10] drm/omapdrm: Use backlight_enable/disable helpers Message-ID: <59f488eaddc4ec0896851ede1ade5062fb2ad3be.1516098341.git.meghana.madhyastha@gmail.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Use backlight_enable/disable helpers instead of changing the property and calling backlight_update_status for cleaner and simpler code and also to avoid repetitions. Signed-off-by: Meghana Madhyastha --- drivers/gpu/drm/omapdrm/displays/panel-dpi.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c b/drivers/gpu/drm/omapdrm/displays/panel-dpi.c index e065f7e10..0803f64cb 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-dpi.c @@ -88,10 +88,8 @@ static int panel_dpi_enable(struct omap_dss_device *dssdev) gpiod_set_value_cansleep(ddata->enable_gpio, 1); - if (ddata->backlight) { - ddata->backlight->props.power = FB_BLANK_UNBLANK; - backlight_update_status(ddata->backlight); - } + if (ddata->backlight) + backlight_enable(ddata->backlight); dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; @@ -106,10 +104,8 @@ static void panel_dpi_disable(struct omap_dss_device *dssdev) if (!omapdss_device_is_enabled(dssdev)) return; - if (ddata->backlight) { - ddata->backlight->props.power = FB_BLANK_POWERDOWN; - backlight_update_status(ddata->backlight); - } + if (ddata->backlight) + backlight_disable(ddata->backlight); gpiod_set_value_cansleep(ddata->enable_gpio, 0); regulator_disable(ddata->vcc_supply); -- 2.11.0