Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932259AbcKHTIe (ORCPT ); Tue, 8 Nov 2016 14:08:34 -0500 Received: from vern.gendns.com ([206.190.152.46]:47601 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751427AbcKHTIc (ORCPT ); Tue, 8 Nov 2016 14:08:32 -0500 Subject: Re: [PATCH v4 1/3] leds: Introduce userspace leds driver To: Jacek Anaszewski , Richard Purdie References: <1474053410-24387-1-git-send-email-david@lechnology.com> <1474053410-24387-2-git-send-email-david@lechnology.com> <0bfdfd46-35e5-321c-5759-0cc96be862fd@samsung.com> Cc: linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org, Marcel Holtmann , Pavel Machek From: David Lechner Message-ID: <0970c634-61ac-8ad7-088a-e47419c23455@lechnology.com> Date: Tue, 8 Nov 2016 13:08:24 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <0bfdfd46-35e5-321c-5759-0cc96be862fd@samsung.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 716 Lines: 27 On 11/8/16 5:26 AM, Jacek Anaszewski wrote: > Hi David, > >> +struct uleds_device { >> + struct uleds_user_dev user_dev; >> + struct led_classdev led_cdev; >> + struct mutex mutex; >> + enum uleds_state state; >> + wait_queue_head_t waitq; >> + unsigned char brightness; > > I've just noticed that this is wrong, since LED subsystem > brightness type is enum led_brightness, i.e. int. > LED_FULL (255) value is a legacy enum value that can be overridden > by max_brightness property. > > Please submit a fix so that I could merge it with the original > patch before sending it upstream. > > Thanks, > Jacek Anaszewski > The brightness should be a 32-bit integer then?