Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166749
b: refs/heads/master
c: ee17962
h: refs/heads/master
i:
  166747: eb1fa14
v: v3
  • Loading branch information
Linus Walleij authored and Russell King committed Oct 1, 2009
1 parent bddfd43 commit 57583a5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 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: aa45ee8fc0ee87c1711b5fe8eb3556d06530c39e
refs/heads/master: ee17962e249024ebba72acbfe7cf54f8ea5b72f8
10 changes: 10 additions & 0 deletions trunk/arch/arm/mach-u300/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,16 @@ int gpio_unregister_callback(unsigned gpio)
}
EXPORT_SYMBOL(gpio_unregister_callback);

/* Non-zero means valid */
int gpio_is_valid(int number)
{
if (number >= 0 &&
number < (U300_GPIO_NUM_PORTS * U300_GPIO_PINS_PER_PORT))
return 1;
return 0;
}
EXPORT_SYMBOL(gpio_is_valid);

int gpio_request(unsigned gpio, const char *label)
{
if (gpio_pin[gpio].users)
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-u300/include/mach/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@
#define PIN_TO_PORT(val) (val >> 3)

/* These can be found in arch/arm/mach-u300/gpio.c */
extern int gpio_is_valid(int number);
extern int gpio_request(unsigned gpio, const char *label);
extern void gpio_free(unsigned gpio);
extern int gpio_direction_input(unsigned gpio);
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/mmc/host/mmci.c
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,6 @@ static int __devinit mmci_probe(struct amba_device *dev, struct amba_id *id)
writel(0, host->base + MMCIMASK1);
writel(0xfff, host->base + MMCICLEAR);

#ifdef CONFIG_GPIOLIB
if (gpio_is_valid(plat->gpio_cd)) {
ret = gpio_request(plat->gpio_cd, DRIVER_NAME " (cd)");
if (ret == 0)
Expand All @@ -697,7 +696,6 @@ static int __devinit mmci_probe(struct amba_device *dev, struct amba_id *id)
else if (ret != -ENOSYS)
goto err_gpio_wp;
}
#endif

ret = request_irq(dev->irq[0], mmci_irq, IRQF_SHARED, DRIVER_NAME " (cmd)", host);
if (ret)
Expand Down

0 comments on commit 57583a5

Please sign in to comment.