aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/sysdev/simple_gpio.c
diff options
context:
space:
mode:
authorGrant Likely <[email protected]>2010-06-08 07:48:16 -0600
committerGrant Likely <[email protected]>2010-07-05 16:14:30 -0600
commit594fa265e084073443390c5b93d5410fd28e9bcd (patch)
tree42c0e5536ae2fd016159e1e1bd1f27f0a9f3cac2 /arch/powerpc/sysdev/simple_gpio.c
parenta19e3da5bc5fc6c10ab73f310bea80f3845b4531 (diff)
of/gpio: stop using device_node data pointer to find gpio_chip
Currently the kernel uses the struct device_node.data pointer to resolve a struct gpio_chip pointer from a device tree node. However, the .data member doesn't provide any type checking and there aren't any rules enforced on what it should be used for. There's no guarantee that the data stored in it actually points to an gpio_chip pointer. Instead of relying on the .data pointer, this patch modifies the code to add a lookup function which scans through the registered gpio_chips and returns the gpio_chip that has a pointer to the specified device_node. Signed-off-by: Grant Likely <[email protected]> CC: Andrew Morton <[email protected]> CC: Anton Vorontsov <[email protected]> CC: Grant Likely <[email protected]> CC: David Brownell <[email protected]> CC: Bill Gatliff <[email protected]> CC: Dmitry Eremin-Solenikov <[email protected]> CC: Benjamin Herrenschmidt <[email protected]> CC: Jean Delvare <[email protected]> CC: [email protected] CC: [email protected]
Diffstat (limited to 'arch/powerpc/sysdev/simple_gpio.c')
0 files changed, 0 insertions, 0 deletions