From: Nate Case Date: Wed, 17 Jun 2009 23:26:17 +0000 (-0700) Subject: gpio: pca953x: Get platform_data from OpenFirmware X-Git-Tag: v2.6.31-rc1~253 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1965d30356c1c65660ba3330927671cfe81acdd5;p=pandora-kernel.git gpio: pca953x: Get platform_data from OpenFirmware On OpenFirmware platforms, it makes the most sense to get platform_data from the device tree. Make an attempt to translate OF node properties into platform_data struct before bailing out. Note that the implementation approach taken differs from other device drivers that make use of device tree information. This is because I2C chips are already registered automatically by of_i2c, so we can get by with a small translator function in the driver. [akpm@linux-foundation.org: coding-style fixes] [akpm@linux-foundation.org: kfree(NULL) is legal] Signed-off-by: Nate Case Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed