linux/arch/microblaze
Grant Likely 594fa265e0 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 <grant.likely@secretlab.ca>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Anton Vorontsov <avorontsov@ru.mvista.com>
CC: Grant Likely <grant.likely@secretlab.ca>
CC: David Brownell <dbrownell@users.sourceforge.net>
CC: Bill Gatliff <bgat@billgatliff.com>
CC: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: Jean Delvare <khali@linux-fr.org>
CC: linux-kernel@vger.kernel.org
CC: devicetree-discuss@lists.ozlabs.org
2010-07-05 16:14:30 -06:00
..
boot microblaze: Makefile cleanups 2010-04-01 08:38:19 +02:00
configs microblaze: Defconfig update 2010-05-06 11:37:42 +02:00
include/asm of: Merge of_device_alloc() and of_device_make_bus_id() 2010-07-05 16:14:29 -06:00
kernel of/gpio: stop using device_node data pointer to find gpio_chip 2010-07-05 16:14:30 -06:00
lib microblaze: Support word copying in copy_tofrom_user 2010-04-01 08:38:25 +02:00
mm microblaze: export assembly functions used by modules 2010-05-13 12:11:42 +02:00
oprofile microblaze: Core oprofile configs and hooks 2009-12-14 08:45:07 +01:00
pci PCI: clear bridge resource range if BIOS assigned bad one 2010-06-11 13:24:51 -07:00
platform microblaze: Use lowest-common-denominator default CPU settings 2009-12-14 08:45:02 +01:00
Kconfig microblaze: Kconfig Fix - pci 2010-04-01 08:38:24 +02:00
Kconfig.debug microblaze: Add TRACE_IRQFLAGS_SUPPORT 2009-12-14 08:40:09 +01:00
Makefile microblaze: Fix Makefile to delete build generated files 2010-04-01 08:38:19 +02:00