s3cmci: convert missed s3c2410_gpio calls to gpiolib calls
[deliverable/linux.git] / drivers / mmc / host / s3cmci.c
index 99b74a3510203a2e258d83c9f9f4d9aa4f9db816..d96e1abf2d64a77fae5a52b0c82e9db8c697ecfc 100644 (file)
@@ -820,7 +820,7 @@ fail_request:
 static void finalize_request(struct s3cmci_host *host)
 {
        struct mmc_request *mrq = host->mrq;
-       struct mmc_command *cmd = host->cmd_is_stop ? mrq->stop : mrq->cmd;
+       struct mmc_command *cmd;
        int debug_as_failure = 0;
 
        if (host->complete_what != COMPLETION_FINALIZE)
@@ -828,6 +828,7 @@ static void finalize_request(struct s3cmci_host *host)
 
        if (!mrq)
                return;
+       cmd = host->cmd_is_stop ? mrq->stop : mrq->cmd;
 
        if (cmd->data && (cmd->error == 0) &&
            (cmd->data->error == 0)) {
@@ -1302,10 +1303,8 @@ static int s3cmci_get_ro(struct mmc_host *mmc)
        if (pdata->no_wprotect)
                return 0;
 
-       ret = s3c2410_gpio_getpin(pdata->gpio_wprotect);
-
-       if (pdata->wprotect_invert)
-               ret = !ret;
+       ret = gpio_get_value(pdata->gpio_wprotect) ? 1 : 0;
+       ret ^= pdata->wprotect_invert;
 
        return ret;
 }
@@ -1360,7 +1359,7 @@ static struct mmc_host_ops s3cmci_ops = {
 
 static struct s3c24xx_mci_pdata s3cmci_def_pdata = {
        /* This is currently here to avoid a number of if (host->pdata)
-        * checks. Any zero fields to ensure reaonable defaults are picked. */
+        * checks. Any zero fields to ensure reasonable defaults are picked. */
 };
 
 #ifdef CONFIG_CPU_FREQ
@@ -1654,7 +1653,7 @@ static int __devinit s3cmci_probe(struct platform_device *pdev)
                        goto probe_free_irq;
                }
 
-               host->irq_cd = s3c2410_gpio_getirq(host->pdata->gpio_detect);
+               host->irq_cd = gpio_to_irq(host->pdata->gpio_detect);
 
                if (host->irq_cd >= 0) {
                        if (request_irq(host->irq_cd, s3cmci_irq_cd,
@@ -1892,7 +1891,7 @@ static int s3cmci_resume(struct device *dev)
        return mmc_resume_host(mmc);
 }
 
-static struct dev_pm_ops s3cmci_pm = {
+static const struct dev_pm_ops s3cmci_pm = {
        .suspend        = s3cmci_suspend,
        .resume         = s3cmci_resume,
 };
This page took 0.028397 seconds and 5 git commands to generate.