From: Lars-Peter Clausen Date: Sat, 12 May 2012 13:39:32 +0000 (+0200) Subject: iio: Add dev_to_iio_dev() helper function X-Git-Tag: v3.5-rc1~145^2~106 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a7913f11ddf932e20d2bde72bec57f2f7a9b49e;p=pandora-kernel.git iio: Add dev_to_iio_dev() helper function This patch adds a helper function for retriving a iio_dev struct from a device struct. Currently we open-code this in two different ways. One is using dev_get_drvdata on the device and the other is using container_of. The new helper function uses the container_of solution as it creates slightly smaller code and also will eventually free up the drvdata pointer for usage by invidual drivers. Signed-off-by: Lars-Peter Clausen Acked-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed