Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 155549
b: refs/heads/master
c: 4aa7826
h: refs/heads/master
i:
  155547: 2e39456
v: v3
  • Loading branch information
Daniel Mack authored and Eric Miao committed Jul 3, 2009
1 parent 7b5b5ad commit 851d86f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5c68b09900f04c3de55af43155435b9392f03844
refs/heads/master: 4aa78264d14bb0e87897acb90941c368248e20ce
9 changes: 2 additions & 7 deletions trunk/arch/arm/plat-pxa/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <linux/irq.h>
#include <linux/io.h>
#include <linux/sysdev.h>
#include <linux/bootmem.h>
#include <linux/slab.h>

#include <mach/gpio.h>

Expand Down Expand Up @@ -112,17 +112,12 @@ static int __init pxa_init_gpio_chip(int gpio_end)
int i, gpio, nbanks = gpio_to_bank(gpio_end) + 1;
struct pxa_gpio_chip *chips;

/* this is early, we have to use bootmem allocator, and we really
* want this to be allocated dynamically for different 'gpio_end'
*/
chips = alloc_bootmem_low(nbanks * sizeof(struct pxa_gpio_chip));
chips = kzalloc(nbanks * sizeof(struct pxa_gpio_chip), GFP_KERNEL);
if (chips == NULL) {
pr_err("%s: failed to allocate GPIO chips\n", __func__);
return -ENOMEM;
}

memset(chips, 0, nbanks * sizeof(struct pxa_gpio_chip));

for (i = 0, gpio = 0; i < nbanks; i++, gpio += 32) {
struct gpio_chip *c = &chips[i].chip;

Expand Down

0 comments on commit 851d86f

Please sign in to comment.