Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933080AbbGUPpF (ORCPT ); Tue, 21 Jul 2015 11:45:05 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:38908 "EHLO mail-wi0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932160AbbGUPpA (ORCPT ); Tue, 21 Jul 2015 11:45:00 -0400 Message-ID: <55AE68A0.3080903@gmail.com> Date: Tue, 21 Jul 2015 17:43:28 +0200 From: Jacek Anaszewski User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Pavel Machek , Jacek Anaszewski CC: linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, cooloney@gmail.com, rpurdie@rpsys.net, stsp@users.sourceforge.net, Andrew Lunn , Sakari Ailus Subject: Re: [PATCH/RFC 03/51] leds: Add an internal led_set_brightness_nosleep function References: <1437122857-6765-1-git-send-email-j.anaszewski@samsung.com> <1437122857-6765-4-git-send-email-j.anaszewski@samsung.com> <20150721095331.GC23841@amd> In-Reply-To: <20150721095331.GC23841@amd> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 847 Lines: 31 On 21.07.2015 11:53, Pavel Machek wrote: > >> /* Set LED brightness level */ >> - /* Must not sleep, use a workqueue if needed */ >> + /* Must not sleep if the driver sets LED_BRIGHTNESS_FAST flag */ >> void (*brightness_set)(struct led_classdev *led_cdev, >> enum led_brightness brightness); >> /* > > Have fun improving static checkers to check for this kind of crazy > semantics. I'd be grateful if you gave an example of the tool that would complain about it. > NAK. > > Just use two callbacks, one of them always NULL. > Pavel > -- Best Regards, Jacek Anaszewski -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/