Message ID | 1401444650-12267-2-git-send-email-a.hajda@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5A63EBEEA7 for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 30 May 2014 10:14:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 700FE2037B for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 30 May 2014 10:14:12 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E728E2034B for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 30 May 2014 10:14:10 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WqJnH-0007Ns-UU; Fri, 30 May 2014 10:12:11 +0000 Received: from mailout3.w1.samsung.com ([210.118.77.13]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WqJnA-0007Db-Qk for linux-arm-kernel@lists.infradead.org; Fri, 30 May 2014 10:12:05 +0000 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N6D00LDVTN97W60@mailout3.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 30 May 2014 11:11:33 +0100 (BST) X-AuditID: cbfec7f5-b7f626d000004b39-66-5388595517a7 Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 25.5C.19257.55958835; Fri, 30 May 2014 11:11:33 +0100 (BST) Received: from AMDC1061.digital.local ([106.116.147.88]) by eusync4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N6D00KBSTMKV180@eusync4.samsung.com>; Fri, 30 May 2014 11:11:33 +0100 (BST) From: Andrzej Hajda <a.hajda@samsung.com> To: Lee Jones <lee.jones@linaro.org>, Jingoo Han <jg1.han@samsung.com>, Bryan Wu <cooloney@gmail.com> Subject: [PATCH 1/2] backlight: show brightness even if get_brightness is not implemented Date: Fri, 30 May 2014 12:10:49 +0200 Message-id: <1401444650-12267-2-git-send-email-a.hajda@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1401444650-12267-1-git-send-email-a.hajda@samsung.com> References: <1401444650-12267-1-git-send-email-a.hajda@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAAy2Ra0hTYRjHfc9tF1qdpslBLGJa1CIvUfRSEoJ+OEFGIEFllFNPm+CmbM7U oiQt10hNpbk01IXDspp5RU1XzealQKe2RXNLzKWjFC94TyWdffs9z//H8//wsFF+KebHTpSl MnKZKElAcLEvG922oxcvq6JDpiZCoN3Qh8OZe/dRaG4tROCfjRIM6kadKBy3dyDw9eADAg7p BnFYNjKGwbxKKwEfFlax4MiCGcD6MRsOe/JncDjU9oyATmcNgNp+IwL/Lm3gcHYuDFavGjBY qLIi0DDqRuCrdjcKpxybFRO6ZRT2ruUBuNJWjsHaCjsBHTYNEr6X7lisxOjWUieLzvk0hdNl qqc43fBCSP+2ODD60WQOTlfWunDaYWsnaFOnCtANVXfpfq0O0Lqv2Qg9+8uO0fM1NpSeNlqJ C95XuGEJTFJiGiMPPhPLlXSuFCEp74n06epmPAv04GrAYVPkcapsUv2ffSnLj1pCDbhsPqkH 1M/s59j2kI9Q6tVlj0WQh6n1hu/EFvuQYsr4UQO2JJQc5lDDT5qwrcCbjKFKtBaPhJEHqPEK jWfPIyMozdgAtl23j+rtKvYc5ZCRlCa318P8TSd7qZP1GPAqgVcN2MMo41MUcWLpsSCFSKpQ ysRB8cnSerD9z4UWoO86ZQIkGwh28CSRudF8XJSmyJCaAMVGBT68jnOqaD4vQZSRyciTr8uV SYzCBBA2xy8LXJVKjhia9DsnXP7l7/JcdcUBKcMFlFfj2cCXcj4SJXCPgv0RiSdue0XN21zG wDep1dZvSqb72lqJ2DGjZ4Sxu2dZbrUhONQ3JmuhaFe8xf8mNWDWrGfeKA8Qnu6bNB/Syurm 0YN34niNzUuXbn0IPwnC38qY8y0ZBYvpc58FmEIiChWicoXoH/m7FLKtAgAA X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140530_031205_012780_757B14C5 X-CRM114-Status: UNSURE ( 7.67 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -5.7 (-----) Cc: Milo Kim <milo.kim@ti.com>, "open list:FRAMEBUFFER LAYER" <linux-fbdev@vger.kernel.org>, Benjamin Herrenschmidt <benh@kernel.crashing.org>, "open list:X86 PLATFORM DRIVERS" <platform-driver-x86@vger.kernel.org>, Andrzej Hajda <a.hajda@samsung.com>, Thierry Reding <thierry.reding@gmail.com>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Yijing Wang <wangyijing@huawei.com>, Matthew Garrett <matthew.garrett@nebula.com>, Kukjin Kim <kgene.kim@samsung.com>, Sachin Kamat <sachin.kamat@linaro.org>, Tomi Valkeinen <tomi.valkeinen@ti.com>, Geert Uytterhoeven <geert@linux-m68k.org>, Daniel Vetter <daniel.vetter@ffwll.ch>, Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>, Dan Carpenter <dan.carpenter@oracle.com>, "open list:PWM SUBSYSTEM" <linux-pwm@vger.kernel.org>, "moderated list:ARM/S5P EXYNOS AR..." <linux-samsung-soc@vger.kernel.org>, Mikulas Patocka <mpatocka@redhat.com>, "moderated list:ARM/S5P EXYNOS AR..." <linux-arm-kernel@lists.infradead.org>, Randy Dunlap <rdunlap@infradead.org>, open list <linux-kernel@vger.kernel.org>, Rob Clark <robdclark@gmail.com>, Jon Mason <jdmason@kudzu.us>, Joe Perches <joe@perches.com>, "open list:LINUX FOR POWER M..." <linuxppc-dev@lists.ozlabs.org> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c index 19b170d..0ce8823 100644 --- a/drivers/video/backlight/backlight.c +++ b/drivers/video/backlight/backlight.c @@ -221,6 +221,8 @@ static ssize_t actual_brightness_show(struct device *dev, mutex_lock(&bd->ops_lock); if (bd->ops && bd->ops->get_brightness) rc = sprintf(buf, "%d\n", bd->ops->get_brightness(bd)); + else + rc = sprintf(buf, "%d\n", bd->props.brightness); mutex_unlock(&bd->ops_lock); return rc;
Many implementations of get_brightness operation returns only value of props.brightness field. This change makes such implementations unnecessary. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> --- drivers/video/backlight/backlight.c | 2 ++ 1 file changed, 2 insertions(+)