aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-25 08:19:14 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-25 08:19:14 -0700
commit51f00a471ce8f359627dd99aeac322947a0e491b (patch)
treede3f0c26359d7846fc5d6d0fdd147e225d979add /drivers/gpio
parentMIPS: MT: Fix build error iFPU affinity code (diff)
parentmtd/m25p80: add support to parse the partitions by OF node (diff)
downloadlinux-dev-51f00a471ce8f359627dd99aeac322947a0e491b.tar.xz
linux-dev-51f00a471ce8f359627dd99aeac322947a0e491b.zip
Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6
* 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6: mtd/m25p80: add support to parse the partitions by OF node of/irq: of_irq.c needs to include linux/irq.h of/mips: Cleanup some include directives/files. of/mips: Add device tree support to MIPS of/flattree: Eliminate need to provide early_init_dt_scan_chosen_arch of/device: Rework to use common platform_device_alloc() for allocating devices of/xsysace: Fix OF probing on little-endian systems of: use __be32 types for big-endian device tree data of/irq: remove references to NO_IRQ in drivers/of/platform.c of/promtree: add package-to-path support to pdt of/promtree: add of_pdt namespace to pdt code of/promtree: no longer call prom_ functions directly; use an ops structure of/promtree: make drivers/of/pdt.c no longer sparc-only sparc: break out some PROM device-tree building code out into drivers/of of/sparc: convert various prom_* functions to use phandle sparc: stop exporting openprom.h header powerpc, of_serial: Endianness issues setting up the serial ports of: MTD: Fix OF probing on little-endian systems of: GPIO: Fix OF probing on little-endian systems
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/xilinx_gpio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpio/xilinx_gpio.c b/drivers/gpio/xilinx_gpio.c
index 709690995d0d..846fbd5e31bf 100644
--- a/drivers/gpio/xilinx_gpio.c
+++ b/drivers/gpio/xilinx_gpio.c
@@ -171,13 +171,13 @@ static int __devinit xgpio_of_probe(struct device_node *np)
/* Update GPIO state shadow register with default value */
tree_info = of_get_property(np, "xlnx,dout-default", NULL);
if (tree_info)
- chip->gpio_state = *tree_info;
+ chip->gpio_state = be32_to_cpup(tree_info);
/* Update GPIO direction shadow register with default value */
chip->gpio_dir = 0xFFFFFFFF; /* By default, all pins are inputs */
tree_info = of_get_property(np, "xlnx,tri-default", NULL);
if (tree_info)
- chip->gpio_dir = *tree_info;
+ chip->gpio_dir = be32_to_cpup(tree_info);
/* Check device node and parent device node for device width */
chip->mmchip.gc.ngpio = 32; /* By default assume full GPIO controller */
@@ -186,7 +186,7 @@ static int __devinit xgpio_of_probe(struct device_node *np)
tree_info = of_get_property(np->parent,
"xlnx,gpio-width", NULL);
if (tree_info)
- chip->mmchip.gc.ngpio = *tree_info;
+ chip->mmchip.gc.ngpio = be32_to_cpup(tree_info);
spin_lock_init(&chip->gpio_lock);