From: Youngmin Nam Date: Fri, 13 May 2016 06:43:52 +0000 (+0900) Subject: spi: s3c64xx: Change CONFIG_PM_RUNTIME to CONFIG_PM X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5ca5b81e224bafeffd69354cecaa716029aa66c0;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git spi: s3c64xx: Change CONFIG_PM_RUNTIME to CONFIG_PM This patch chagnes CONFIG_PM_RUNTIME to CONFIG_PM in exynos SPI driver. This patch shoud be applied to sync with below commit. commit 464ed18ebdb6236fcff59d2a35d4d2e28668435a PM: Eliminate CONFIG_PM_RUNTIME Having switched over all of the users of CONFIG_PM_RUNTIME to use CONFIG_PM directly, turn the latter into a user-selectable option and drop the former entirely from the tree. Change-Id: Idaf5261c150284009c8d58737c99cb16f0a61b85 Signed-off-by: Youngmin Nam --- diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 090a9bd0b804..62cc3e84b0a8 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -413,11 +413,11 @@ static int s3c64xx_spi_prepare_transfer(struct spi_master *spi) { struct s3c64xx_spi_driver_data *sdd = spi_master_get_devdata(spi); struct s3c64xx_spi_info *sci = sdd->cntrlr_info; -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM int ret; #endif -#ifndef CONFIG_PM_RUNTIME +#ifndef CONFIG_PM if (sci->dma_mode == DMA_MODE) { /* Acquire DMA channels */ while (!acquire_dma(sdd)) @@ -425,7 +425,7 @@ static int s3c64xx_spi_prepare_transfer(struct spi_master *spi) } #endif -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM ret = pm_runtime_get_sync(&sdd->pdev->dev); if(ret < 0) return ret; @@ -440,11 +440,11 @@ static int s3c64xx_spi_prepare_transfer(struct spi_master *spi) static int s3c64xx_spi_unprepare_transfer(struct spi_master *spi) { struct s3c64xx_spi_driver_data *sdd = spi_master_get_devdata(spi); -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM int ret; #endif -#ifndef CONFIG_PM_RUNTIME +#ifndef CONFIG_PM struct s3c64xx_spi_info *sci = sdd->cntrlr_info; /* Free DMA channels */ @@ -465,7 +465,7 @@ static int s3c64xx_spi_unprepare_transfer(struct spi_master *spi) } #endif -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM pm_runtime_mark_last_busy(&sdd->pdev->dev); ret = pm_runtime_put_autosuspend(&sdd->pdev->dev); if(ret < 0) @@ -1166,7 +1166,7 @@ static int s3c64xx_spi_setup(struct spi_device *spi) goto setup_exit; } -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM pm_runtime_get_sync(&sdd->pdev->dev); #endif @@ -1213,7 +1213,7 @@ static int s3c64xx_spi_setup(struct spi_device *spi) disable_cs(sdd, spi); -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM pm_runtime_mark_last_busy(&sdd->pdev->dev); pm_runtime_put_autosuspend(&sdd->pdev->dev); #endif @@ -1559,7 +1559,7 @@ static int s3c64xx_spi_probe(struct platform_device *pdev) ret = PTR_ERR(sdd->src_clk); goto err2; } -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM pm_runtime_use_autosuspend(&pdev->dev); pm_runtime_enable(&pdev->dev); pm_runtime_get_sync(&pdev->dev); @@ -1638,7 +1638,7 @@ static int s3c64xx_spi_probe(struct platform_device *pdev) S3C64XX_SPI_INT_TX_OVERRUN_EN | S3C64XX_SPI_INT_TX_UNDERRUN_EN, sdd->regs + S3C64XX_SPI_INT_EN); -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM pm_runtime_mark_last_busy(&pdev->dev); pm_runtime_put_sync(&pdev->dev); #endif @@ -1652,7 +1652,7 @@ static int s3c64xx_spi_probe(struct platform_device *pdev) list_add_tail(&sci->node, &drvdata_list); sdd->is_probed = 1; -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM if (sci->domain == DOMAIN_TOP) pm_runtime_set_autosuspend_delay(&pdev->dev, sdd->spi_clkoff_time); @@ -1675,7 +1675,7 @@ static int s3c64xx_spi_probe(struct platform_device *pdev) return 0; err3: -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM pm_runtime_disable(&pdev->dev); #endif clk_disable_unprepare(sdd->src_clk); @@ -1693,7 +1693,7 @@ static int s3c64xx_spi_remove(struct platform_device *pdev) struct spi_master *master = spi_master_get(platform_get_drvdata(pdev)); struct s3c64xx_spi_driver_data *sdd = spi_master_get_devdata(master); -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM pm_runtime_disable(&pdev->dev); #endif @@ -1718,7 +1718,7 @@ static int s3c64xx_spi_suspend_operation(struct device *dev) { struct spi_master *master = dev_get_drvdata(dev); struct s3c64xx_spi_driver_data *sdd = spi_master_get_devdata(master); -#ifndef CONFIG_PM_RUNTIME +#ifndef CONFIG_PM struct s3c64xx_spi_info *sci = sdd->cntrlr_info; #endif @@ -1728,7 +1728,7 @@ static int s3c64xx_spi_suspend_operation(struct device *dev) return ret; } -#ifndef CONFIG_PM_RUNTIME +#ifndef CONFIG_PM if (sci->domain == DOMAIN_TOP) { /* Disable the clock */ clk_disable_unprepare(sdd->src_clk); @@ -1762,7 +1762,7 @@ static int s3c64xx_spi_resume_operation(struct device *dev) else s3c64xx_spi_hwinit(sdd, sdd->port_id); -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM /* Disable the clock */ clk_disable_unprepare(sdd->src_clk); clk_disable_unprepare(sdd->clk); @@ -1847,7 +1847,7 @@ static int s3c64xx_spi_resume(struct device *dev) } #endif /* CONFIG_PM_SLEEP */ -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM static void s3c64xx_spi_pin_ctrl(struct device *dev, int en) { struct spi_master *master = dev_get_drvdata(dev); @@ -1934,7 +1934,7 @@ static int s3c64xx_spi_runtime_resume(struct device *dev) return 0; } -#endif /* CONFIG_PM_RUNTIME */ +#endif /* CONFIG_PM */ static const struct dev_pm_ops s3c64xx_spi_pm = { SET_SYSTEM_SLEEP_PM_OPS(s3c64xx_spi_suspend, s3c64xx_spi_resume)