From patchwork Tue Aug 23 16:42:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 9296697 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 8E2CC60757 for ; Wed, 24 Aug 2016 02:06:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7192D28DAE for ; Wed, 24 Aug 2016 02:06:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6632028DBE; Wed, 24 Aug 2016 02:06:58 +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 C02D928DAE for ; Wed, 24 Aug 2016 02:06:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6C6356E33F; Wed, 24 Aug 2016 02:06:55 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 327 seconds by postgrey-1.35 at gabe; Tue, 23 Aug 2016 16:51:54 UTC Received: from condef003-v.nifty.com (condef003-v.nifty.com [210.131.4.240]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9FE836E14A for ; Tue, 23 Aug 2016 16:51:54 +0000 (UTC) Received: from conuserg-07.nifty.com ([10.26.8.70])by condef003-v.nifty.com with ESMTP id u7NGhx9w031244 for ; Wed, 24 Aug 2016 01:43:59 +0900 Received: from grover.sesame (FL1-119-242-215-193.osk.mesh.ad.jp [119.242.215.193]) (authenticated) by conuserg-07.nifty.com with ESMTP id u7NGhFSY012526; Wed, 24 Aug 2016 01:43:18 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com u7NGhFSY012526 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1471970598; bh=bDqj8a4fEM58vBWmFlr8C2Kdx4fuJVCDrGq9PjFL4Y0=; h=From:To:Cc:Subject:Date:From; b=zB6N++03wNHO7pa4pmcU3qGMXtwSNe4tRU3fAFM3LyojW/7wvPNtiT+14RYLC/2u2 iJBGd1WGgovCWdCMHMrzB/bVTlBdOaA8jo+FkUHrVlIg9mshUt+NC7LSC8W9V1q3XT BuCOVriCWLTj1+/ITdViPB35WL0+LsDu710znZrbrogECozgjt774pem7PQjnZL7sc nbW/wTxvKwY48c2+CtnCrMtXN4RHWuL+3vGm8GqMKh2JpJX552tlj1i5D+2M4JVPh0 Z1xI/zsojsFthyKHTr/nBMtbRf7HVmPwI99RuB4axyEhE6dKYRFogDDh2tS+IiqDA3 N9I39m1a+CNDg== X-Nifty-SrcIP: [119.242.215.193] From: Masahiro Yamada To: Daniel Vetter , dri-devel@lists.freedesktop.org Subject: [PATCH] drm/gma500: remove unnecessary config_enabled() guard Date: Wed, 24 Aug 2016 01:42:54 +0900 Message-Id: <1471970574-23906-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 X-Mailman-Approved-At: Wed, 24 Aug 2016 02:06:54 +0000 Cc: Masahiro Yamada , Andrew Morton , linux-kernel@vger.kernel.org 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 Commit d112a8163f83 ("gma500/cdv: Add eDP support") replaced the code inside this if-conditional with gma_backlight_set(), which becomes a nop stub if CONFIG_BACKLIGHT_CLASS_DEVICE is disabled. So, there is no need to guard the caller with config_enabled(). Note: This is one of remaining TODOs to deprecate config_enabled() macro. Refer to commit 97f2645f358b ("tree-wide: replace config_enabled() with IS_ENABLED()"). Signed-off-by: Masahiro Yamada --- drivers/gpu/drm/gma500/opregion.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/gma500/opregion.c b/drivers/gpu/drm/gma500/opregion.c index ab696ca..eab6d88 100644 --- a/drivers/gpu/drm/gma500/opregion.c +++ b/drivers/gpu/drm/gma500/opregion.c @@ -163,10 +163,7 @@ static u32 asle_set_backlight(struct drm_device *dev, u32 bclp) if (bclp > 255) return ASLE_BACKLIGHT_FAILED; - if (config_enabled(CONFIG_BACKLIGHT_CLASS_DEVICE)) { - int max = bd->props.max_brightness; - gma_backlight_set(dev, bclp * max / 255); - } + gma_backlight_set(dev, bclp * bd->props.max_brightness / 255); asle->cblv = (bclp * 0x64) / 0xff | ASLE_CBLV_VALID;