Received: by 10.223.176.46 with SMTP id f43csp974724wra; Wed, 24 Jan 2018 08:41:28 -0800 (PST) X-Google-Smtp-Source: AH8x227RHsWauTxVhDTZpVm44HhnidcyH0r/pizrSVD6QfAlhcgtJkr7FHaX5IPUEMU4mymsozG7 X-Received: by 10.98.194.8 with SMTP id l8mr13608103pfg.26.1516812088377; Wed, 24 Jan 2018 08:41:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516812088; cv=none; d=google.com; s=arc-20160816; b=xF/vJLvq6cTl1XpgT6WqReP+pNhPP3/+fSB7SC58I8ZTt/4C+Rjsz0Qb88CANsEt24 Fs8is2DGYdcX9BwFt3ichI/TSw6E5rgFYxJ6cJeNpDiDFpQ/+o3TxXoBGSPZQHAbGGTq jdoNA6QlF5ToJ3u/J8P5wgWKWKte9G9lBBhgneR5cGz8feGC7U/fvMnOwapU7vSknHNN 7wBLHkyiou4F4xD2+SRSlDo1FO1e3NquH9xiPfCWzet4V2DJ4IesL78ZfWJO1mEdAaQS 5hIkNgCic2duOm7rEQqDQtK5qbkER2DpfiJsMVtX1pHbnBMvB79g5lhAq51zj48/lVau k8pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:dkim-signature :arc-authentication-results; bh=OcUwq4N4v2W1MDTW3chkrO+XyTptVuW9UwSZixHmJTE=; b=WLfoYzMdKS2nxUldHCNEeZ2MegR5W8b7B5JpWu+MxB732G5uqh/UnqMCmklOrCAhOu 5M66Fafmm9B6se2Qgb8OFtjeXoSzCdb+7wJfowNC3A7rfxlzO4mbN+4QsSoG4RuOkSqt wJkdcRGx05GV9ZdHhNGqCqVdcDlPkuIkKajr8myqypRr2Qa5wQDDWc9J9lppkqGTRuzK 5V1wsxpKFmonY7jf2N2pdJ7gYGZL/SOh95PN2Sse3Zy69WUHsuz0ZGfP1T2Tpld132RE jT1HqcPPp7bvxtih3Wbfm6yLgZglRVWn7x5Rd1LaeuBcGgTCr0RelvZ9SICcYXPI3p0I 0wQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=C2mS6UZr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p24si3111205pff.76.2018.01.24.08.41.14; Wed, 24 Jan 2018 08:41:28 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=C2mS6UZr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964940AbeAXQkW (ORCPT + 99 others); Wed, 24 Jan 2018 11:40:22 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:39571 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964871AbeAXQkT (ORCPT ); Wed, 24 Jan 2018 11:40:19 -0500 Received: by mail-pf0-f193.google.com with SMTP id e11so3490006pff.6 for ; Wed, 24 Jan 2018 08:40:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=OcUwq4N4v2W1MDTW3chkrO+XyTptVuW9UwSZixHmJTE=; b=C2mS6UZrf0Q5dCDW7hcf2y1LbqkMvxyXy29gVzGx0ud7Isce5mYZdXc+pjITUbWtgl fh6a/r8wGs6BiFS6D7g8r64B/iuFRxWZKQ7MFUi+/ryp0w18XPjYeLsg6kCDy5Wn6CtD UEH5RUZml8o6BLgIczM0ouIpKi0GGRFbzFdUMRaN0Fc/lvNG/0gjNqFQKyefcHWRlkBo JQ6stb8XPjyQCi+nPVcNX33cq4SnNHX+T5GCvmpl/wt6Oj//Sib5SnFA1yMbeY2KVNYp ArmyZwWB7O8j92ep8SVil4kwBvpVgGx2Acg/Xy0SBA1hBmjFIgY6RL0Az8UgW2AYjhnW 0L1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=OcUwq4N4v2W1MDTW3chkrO+XyTptVuW9UwSZixHmJTE=; b=hg4TYAIkCS2x28P5ggaxxRV3qEnwkDUDKrfZa7RFPQ9fg4Vu5rfkDYkmoSUUlLjWg5 3VqFoEMlonIzk8fToPLad/aUnwco0Mf8+bekJmGuTUGX1rS9su2VBQaVplsK8NJDft/t odS4ZL9MS1Hv1G2qQAg3o6lorwh2Jy2fQyqOATchDsPEvdAqV8t9HSaoekXFn3EVNdsv T5DArG6Ic7aFFQE3AhycUbYTamV3nRBQzYZ88cZXTLLK7xnmi863THjy8H4PbVDXU9yc 4A2ZgxbcBL/k3S6D6lsbzxXQ9MlPOAy2XXjMC1i5zBvukEhhu0r72ge/nQ9ES84xjPIo U5wQ== X-Gm-Message-State: AKwxytfhsCctv3L8ZAI8H+mPPtkwYM8jy+o0sgD2LhN7vB7i1aV1Yh79 bpbfsCeUSMQMM5X1Jursyno= X-Received: by 10.101.72.143 with SMTP id n15mr10920785pgs.181.1516812018602; Wed, 24 Jan 2018 08:40:18 -0800 (PST) Received: from raspberrypi ([122.172.61.122]) by smtp.gmail.com with ESMTPSA id x4sm1228811pgc.92.2018.01.24.08.40.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Jan 2018 08:40:17 -0800 (PST) Date: Wed, 24 Jan 2018 16:40:12 +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 v19 08/10] drm/omapdrm: Use backlight_enable/disable helpers Message-ID: <30d5b26c3c7d75de3d2ab3cff9dee67084fc3caf.1516810725.git.meghana.madhyastha@gmail.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Reviewed-by: Noralf Tr?nnes Reviewed-by: Sean Paul Signed-off-by: Meghana Madhyastha --- drivers/gpu/drm/omapdrm/displays/panel-dpi.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c b/drivers/gpu/drm/omapdrm/displays/panel-dpi.c index e065f7e10..ac9596251 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-dpi.c @@ -87,11 +87,7 @@ 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); - } + backlight_enable(ddata->backlight); dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; @@ -106,10 +102,7 @@ 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); - } + backlight_disable(ddata->backlight); gpiod_set_value_cansleep(ddata->enable_gpio, 0); regulator_disable(ddata->vcc_supply); -- 2.11.0