staging:iio:light:tsl2583 allocate chip state with iio_dev
authorJonathan Cameron <jic23@cam.ac.uk>
Fri, 12 Aug 2011 16:08:52 +0000 (17:08 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 23 Aug 2011 20:31:12 +0000 (13:31 -0700)
commite05e5f2336a94f127553c947dcfe2ce15f2c5f9a
treec0ff43619e0338a8584ba7a243beb9c6a5a3632a
parent355e25c1de7c87e3629cdcb11c2f95719b5ed807
staging:iio:light:tsl2583 allocate chip state with iio_dev

There are some unusual corners in the probe function of this
driver, so may need another look.

V2: Now with the check for allocation success not inverted.
V3: Now with the i2c devdata calls actually being correctly cast.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Tested-by: Jon Brenner <jbrenner@TAOSinc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/iio/light/tsl2583.c