diff options
author | Beomho Seo <beomho.seo@samsung.com> | 2013-11-12 16:36:22 +0900 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-11-18 11:46:00 +0900 |
commit | 5058c5ee3865160807dba2abe27c40d040850799 (patch) | |
tree | db6dd27c6b772c616ab3ccbb139e1213bfefdd0c | |
parent | 4ae4869ca3ee97f95400fb2f4a105de6e88c0c69 (diff) | |
download | linux-3.10-5058c5ee3865160807dba2abe27c40d040850799.tar.gz linux-3.10-5058c5ee3865160807dba2abe27c40d040850799.tar.bz2 linux-3.10-5058c5ee3865160807dba2abe27c40d040850799.zip |
mmc: sdhci-s3c: Add irq_set_wake function
- Add irq_set_irq_wake function for control irq
- Remove unused variables
Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
-rw-r--r-- | drivers/mmc/host/sdhci-s3c.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c index acc00998299..17abed34752 100644 --- a/drivers/mmc/host/sdhci-s3c.c +++ b/drivers/mmc/host/sdhci-s3c.c @@ -53,8 +53,6 @@ struct sdhci_s3c { struct resource *ioarea; struct s3c_sdhci_platdata *pdata; unsigned int cur_clk; - int ext_cd_irq; - int ext_cd_gpio; struct clk *clk_io; struct clk *clk_bus[MAX_BUS_CLK]; @@ -394,7 +392,6 @@ static int sdhci_s3c_parse_dt(struct device *dev, struct sdhci_host *host, struct s3c_sdhci_platdata *pdata) { struct device_node *node = dev->of_node; - struct sdhci_s3c *ourhost = to_s3c(host); u32 max_width; int gpio; @@ -418,7 +415,6 @@ static int sdhci_s3c_parse_dt(struct device *dev, if (gpio_is_valid(gpio)) { pdata->cd_type = S3C_SDHCI_CD_GPIO; pdata->ext_cd_gpio = gpio; - ourhost->ext_cd_gpio = -1; if (of_get_property(node, "cd-inverted", NULL)) pdata->ext_cd_gpio_invert = 1; return 0; @@ -493,10 +489,9 @@ static int sdhci_s3c_probe(struct platform_device *pdev) ret = sdhci_s3c_parse_dt(&pdev->dev, host, pdata); if (ret) goto err_pdata_io_clk; - } else { + } else memcpy(pdata, pdev->dev.platform_data, sizeof(*pdata)); - sc->ext_cd_gpio = -1; /* invalid gpio number */ - } + drv_data = sdhci_s3c_get_driver_data(pdev); @@ -656,6 +651,7 @@ static int sdhci_s3c_probe(struct platform_device *pdev) "failed to request card detect gpio\n"); goto err_req_cd; } + irq_set_irq_wake(gpio_to_irq(pdata->ext_cd_gpio), 1); } #ifdef CONFIG_PM_RUNTIME |