Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751756AbYLCKEW (ORCPT ); Wed, 3 Dec 2008 05:04:22 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751079AbYLCKEM (ORCPT ); Wed, 3 Dec 2008 05:04:12 -0500 Received: from tim.rpsys.net ([194.106.48.114]:36690 "EHLO tim.rpsys.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750744AbYLCKEL (ORCPT ); Wed, 3 Dec 2008 05:04:11 -0500 Subject: Re: leds/leds-pca9532.c: sleeping function called in .brightness_set() From: Richard Purdie To: Guennadi Liakhovetski Cc: linux-kernel@vger.kernel.org In-Reply-To: References: Content-Type: text/plain Date: Wed, 03 Dec 2008 10:03:27 +0000 Message-Id: <1228298607.9126.1.camel@ted> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1081 Lines: 30 On Mon, 2008-11-24 at 10:51 +0100, Guennadi Liakhovetski wrote: > this seems to explicitly violate the API as documented in > include/linux/leds.h: > > /* Set LED brightness level */ > /* Must not sleep, use a workqueue if needed */ > void (*brightness_set)(struct led_classdev *led_cdev, > enum led_brightness brightness); > > and also contradicts some other drivers, e.g., pca955x, which do use a > workqueue as suggested: leds-pca9532.c::pca9532_set_brightness uses a > mutex for locking and calls i2c_smbus functions directly. Needs to be > fixed (if it hasn't been fixed yet), probably, also vor 2.6.27-stable. There is a patch queued to fix this now. I'll submit some fixes to 2.6.28-rcX shortly and then we can consider it for -stable. Cheers, Richard -- Richard Purdie Intel Open Source Technology Centre -- 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/