File tree Expand file tree Collapse file tree 4 files changed +23
-2
lines changed Expand file tree Collapse file tree 4 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -770,6 +770,8 @@ int renesas_sdhi_probe(struct platform_device *pdev,
770
770
/* All SDHI have SDIO status bits which must be 1 */
771
771
mmc_data -> flags |= TMIO_MMC_SDIO_STATUS_SETBITS ;
772
772
773
+ pm_runtime_enable (& pdev -> dev );
774
+
773
775
ret = renesas_sdhi_clk_enable (host );
774
776
if (ret )
775
777
goto efree ;
@@ -850,6 +852,8 @@ int renesas_sdhi_probe(struct platform_device *pdev,
850
852
efree :
851
853
tmio_mmc_host_free (host );
852
854
855
+ pm_runtime_disable (& pdev -> dev );
856
+
853
857
return ret ;
854
858
}
855
859
EXPORT_SYMBOL_GPL (renesas_sdhi_probe );
@@ -861,6 +865,8 @@ int renesas_sdhi_remove(struct platform_device *pdev)
861
865
tmio_mmc_host_remove (host );
862
866
renesas_sdhi_clk_disable (host );
863
867
868
+ pm_runtime_disable (& pdev -> dev );
869
+
864
870
return 0 ;
865
871
}
866
872
EXPORT_SYMBOL_GPL (renesas_sdhi_remove );
Original file line number Diff line number Diff line change @@ -172,6 +172,8 @@ static int tmio_mmc_probe(struct platform_device *pdev)
172
172
host -> mmc -> f_max = pdata -> hclk ;
173
173
host -> mmc -> f_min = pdata -> hclk / 512 ;
174
174
175
+ pm_runtime_enable (& pdev -> dev );
176
+
175
177
ret = tmio_mmc_host_probe (host );
176
178
if (ret )
177
179
goto host_free ;
@@ -191,6 +193,7 @@ static int tmio_mmc_probe(struct platform_device *pdev)
191
193
tmio_mmc_host_remove (host );
192
194
host_free :
193
195
tmio_mmc_host_free (host );
196
+ pm_runtime_disable (& pdev -> dev );
194
197
cell_disable :
195
198
if (cell -> disable )
196
199
cell -> disable (pdev );
@@ -207,6 +210,8 @@ static int tmio_mmc_remove(struct platform_device *pdev)
207
210
if (cell -> disable )
208
211
cell -> disable (pdev );
209
212
213
+ pm_runtime_disable (& pdev -> dev );
214
+
210
215
return 0 ;
211
216
}
212
217
Original file line number Diff line number Diff line change @@ -1153,6 +1153,15 @@ void tmio_mmc_host_free(struct tmio_mmc_host *host)
1153
1153
}
1154
1154
EXPORT_SYMBOL_GPL (tmio_mmc_host_free );
1155
1155
1156
+ /**
1157
+ * tmio_mmc_host_probe() - Common probe for all implementations
1158
+ * @_host: Host to probe
1159
+ *
1160
+ * Perform tasks common to all implementations probe functions.
1161
+ *
1162
+ * The caller should have called pm_runtime_enable() prior to calling
1163
+ * the common probe function.
1164
+ */
1156
1165
int tmio_mmc_host_probe (struct tmio_mmc_host * _host )
1157
1166
{
1158
1167
struct platform_device * pdev = _host -> pdev ;
@@ -1261,7 +1270,6 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host)
1261
1270
pm_runtime_set_active (& pdev -> dev );
1262
1271
pm_runtime_set_autosuspend_delay (& pdev -> dev , 50 );
1263
1272
pm_runtime_use_autosuspend (& pdev -> dev );
1264
- pm_runtime_enable (& pdev -> dev );
1265
1273
1266
1274
ret = mmc_add_host (mmc );
1267
1275
if (ret )
@@ -1297,7 +1305,6 @@ void tmio_mmc_host_remove(struct tmio_mmc_host *host)
1297
1305
1298
1306
pm_runtime_dont_use_autosuspend (& pdev -> dev );
1299
1307
pm_runtime_put_sync (& pdev -> dev );
1300
- pm_runtime_disable (& pdev -> dev );
1301
1308
}
1302
1309
EXPORT_SYMBOL_GPL (tmio_mmc_host_remove );
1303
1310
Original file line number Diff line number Diff line change @@ -631,6 +631,7 @@ static int uniphier_sd_probe(struct platform_device *pdev)
631
631
host -> clk_disable = uniphier_sd_clk_disable ;
632
632
host -> set_clock = uniphier_sd_set_clock ;
633
633
634
+ pm_runtime_enable (& pdev -> dev );
634
635
ret = uniphier_sd_clk_enable (host );
635
636
if (ret )
636
637
goto free_host ;
@@ -652,6 +653,7 @@ static int uniphier_sd_probe(struct platform_device *pdev)
652
653
653
654
free_host :
654
655
tmio_mmc_host_free (host );
656
+ pm_runtime_disable (& pdev -> dev );
655
657
656
658
return ret ;
657
659
}
@@ -662,6 +664,7 @@ static int uniphier_sd_remove(struct platform_device *pdev)
662
664
663
665
tmio_mmc_host_remove (host );
664
666
uniphier_sd_clk_disable (host );
667
+ pm_runtime_disable (& pdev -> dev );
665
668
666
669
return 0 ;
667
670
}
You can’t perform that action at this time.
0 commit comments