Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761055AbZJIOyN (ORCPT ); Fri, 9 Oct 2009 10:54:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1761044AbZJIOyM (ORCPT ); Fri, 9 Oct 2009 10:54:12 -0400 Received: from ppsw-6.csi.cam.ac.uk ([131.111.8.136]:48699 "EHLO ppsw-6.csi.cam.ac.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760854AbZJIOyL (ORCPT ); Fri, 9 Oct 2009 10:54:11 -0400 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: not scanned X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Message-ID: <4ACF4E73.5010606@gmail.com> Date: Fri, 09 Oct 2009 15:53:39 +0100 From: Jonathan Cameron User-Agent: Thunderbird 2.0.0.23 (X11/20091007) MIME-Version: 1.0 To: Jonathan Cameron CC: LKML , Zhang Rui , Jean Delvare , Rodolfo Giometti , "Michele De Candia (VT)" , Linux I2C Subject: Re: [PATCH] ALS: TSL2550 driver move from i2c/chips References: <4ACF4AC6.7070802@cam.ac.uk> In-Reply-To: <4ACF4AC6.7070802@cam.ac.uk> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 736 Lines: 28 Friday afternoon moment.... That id element will need to be signed for any errors on idr allocation to be detected. Will fix for next version. > struct tsl2550_data { > + struct device *classdev; > struct i2c_client *client; > struct mutex update_lock; > + unsigned int id; > > unsigned int power_state : 1; > unsigned int operating_mode : 1; > .... > > + data->id = tsl2550_get_id(); > + if (data->id < 0) { > + err = data->id; > + goto exit_kfree; > + } > Jonathan -- 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/