From patchwork Tue Nov 12 03:39:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyungmin Park X-Patchwork-Id: 3170641 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 115B29F461 for ; Tue, 12 Nov 2013 03:39:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4180A20320 for ; Tue, 12 Nov 2013 03:39:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 21ADC20211 for ; Tue, 12 Nov 2013 03:39:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751427Ab3KLDiv (ORCPT ); Mon, 11 Nov 2013 22:38:51 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:11748 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751279Ab3KLDiu (ORCPT ); Mon, 11 Nov 2013 22:38:50 -0500 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MW400A81SSPF7K0@mailout1.samsung.com>; Tue, 12 Nov 2013 12:38:49 +0900 (KST) X-AuditID: cbfee61a-b7f836d0000025d7-0a-5281a2c92c00 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id EC.CA.09687.9C2A1825; Tue, 12 Nov 2013 12:38:49 +0900 (KST) Received: from july ([10.252.75.74]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MW400F76SSOMF50@mmp1.samsung.com>; Tue, 12 Nov 2013 12:38:49 +0900 (KST) Received: by july (sSMTP sendmail emulation); Tue, 12 Nov 2013 12:39:06 +0900 Date: Tue, 12 Nov 2013 12:39:06 +0900 From: Kyungmin Park To: Richard Purdie , Jingoo Han Cc: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, kay@vrfy.org Subject: [PATCH v2] video: backlight: Remove backlight sysfs uevent Message-id: <20131112033906.GA30454@july> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrPLMWRmVeSWpSXmKPExsVy+t9jAd2TixqDDB6tEbS4vPASq8WtVc/Z LU70fWC1uLxrDpvF7l1PWR1YPfbM/8Hq0bdlFaPH501yHh/XewawRHHZpKTmZJalFunbJXBl LLr/grngPHfFqdYjzA2MDzi7GDk5JARMJG7u3M0KYYtJXLi3nq2LkYtDSGARo8TL76uZIZwv jBLPp/5nA6kSEvCVuLanlbGLkYODRUBV4vUGbpAwm4CWxJUPe9hBbBEBD4npz44ygdjMAt4S h6fMAlsgLOAscezWSrA4r4CmxNoLb9ghbEGJH5PvsUDUa0ms33kcqlda4tHfGWA1ogIqElNO bmObwMg/C0nLLCQts5C0LGBkXsUomlqQXFCclJ5rqFecmFtcmpeul5yfu4kRHKzPpHYwrmyw OMQowMGoxMO7g6sxSIg1say4MvcQowQHs5IIr3kuUIg3JbGyKrUoP76oNCe1+BCjNAeLkjjv gVbrQCGB9MSS1OzU1ILUIpgsEwenVAOj1O/ob5lX+Sqnhafd1E6Qd4lamffvhIpVYm3JOe8H ejfWSt4rDeRar1e3hkfkzM6/qr4W9602bfB9+DUyO7Nomu+jNtm/ex7EXP7KpqVmt9Up/uCu gFcMm7+lfXD0Z90guXDmSh0/uff8r3PTY94G2Xkdnv/0TT631buDZbIOkiFLQoVKrn1XYinO SDTUYi4qTgQAPHFCp1ICAAA= Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 From: Kyungmin Park The most mobile phones have Ambient Light Sensors and it changes brightness according lux. It means it changes backlight brightness frequently by just writing sysfs node, so it generates uevent. Usually there's no user to use this backlight changes. But it forks udev worker threads and it takes about 5ms. The main problem is that it hurts other process activities. so remove it. Kay said "Uevents are for the major, low-frequent, global device state-changes, not for carrying-out any sort of measurement data. Subsystems which need that should use other facilities like poll()-able sysfs file or any other subscription-based, client-tracking interface which does not cause overhead if it isn't used. Uevents are not the right thing to use here, and upstream udev should not paper-over broken kernel subsystems." Signed-off-by: Kyungmin Park Acked-by: Jingoo Han --- v1: there's still user to use BACKLIGHT_UPDATE_SYSFS. so just remove store sysfs node uevent --- -- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c index 94a403a..292cf99 100644 --- a/drivers/video/backlight/backlight.c +++ b/drivers/video/backlight/backlight.c @@ -172,8 +172,6 @@ static ssize_t brightness_store(struct device *dev, } mutex_unlock(&bd->ops_lock); - backlight_generate_event(bd, BACKLIGHT_UPDATE_SYSFS); - return rc; } static DEVICE_ATTR_RW(brightness);