projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[target] generic: ESFQ patch, only include net/netfilter/nf_conntrack.h when CONFIG_N...
[openwrt.git]
/
target
/
linux
/
brcm63xx
/
files
/
drivers
/
pcmcia
/
bcm63xx_pcmcia.c
diff --git
a/target/linux/brcm63xx/files/drivers/pcmcia/bcm63xx_pcmcia.c
b/target/linux/brcm63xx/files/drivers/pcmcia/bcm63xx_pcmcia.c
index
94a7762
..
383e322
100644
(file)
--- a/
target/linux/brcm63xx/files/drivers/pcmcia/bcm63xx_pcmcia.c
+++ b/
target/linux/brcm63xx/files/drivers/pcmcia/bcm63xx_pcmcia.c
@@
-409,9
+409,18
@@
static int bcm63xx_drv_pcmcia_probe(struct platform_device *pdev)
val |= 3 << PCMCIA_C2_HOLD_SHIFT;
pcmcia_writel(skt, val, PCMCIA_C2_REG);
val |= 3 << PCMCIA_C2_HOLD_SHIFT;
pcmcia_writel(skt, val, PCMCIA_C2_REG);
+ /* request and setup ready gpio */
+ ret = gpio_request(skt->pd->ready_gpio, "bcm63xx_pcmcia");
+ if (ret < 0)
+ goto err;
+
+ ret = gpio_direction_input(skt->pd->ready_gpio);
+ if (ret < 0)
+ goto err_gpio;
+
ret = pcmcia_register_socket(sock);
if (ret)
ret = pcmcia_register_socket(sock);
if (ret)
- goto err;
+ goto err
_gpio
;
/* start polling socket */
mod_timer(&skt->timer,
/* start polling socket */
mod_timer(&skt->timer,
@@
-420,6
+429,9
@@
static int bcm63xx_drv_pcmcia_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, skt);
return 0;
platform_set_drvdata(pdev, skt);
return 0;
+err_gpio:
+ gpio_free(skt->pd->ready_gpio);
+
err:
if (skt->io_base)
iounmap(skt->io_base);
err:
if (skt->io_base)
iounmap(skt->io_base);
@@
-442,6
+454,8
@@
static int bcm63xx_drv_pcmcia_remove(struct platform_device *pdev)
iounmap(skt->io_base);
res = skt->reg_res;
release_mem_region(res->start, res->end - res->start + 1);
iounmap(skt->io_base);
res = skt->reg_res;
release_mem_region(res->start, res->end - res->start + 1);
+ gpio_free(skt->pd->ready_gpio);
+ platform_set_drvdata(pdev, NULL);
kfree(skt);
return 0;
}
kfree(skt);
return 0;
}
This page took
0.029393 seconds
and
4
git commands to generate.