File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -863,11 +863,9 @@ static int spmmc_drv_probe(struct platform_device *pdev)
863
863
struct spmmc_host * host ;
864
864
int ret = 0 ;
865
865
866
- mmc = mmc_alloc_host (sizeof (* host ), & pdev -> dev );
867
- if (!mmc ) {
868
- ret = - ENOMEM ;
869
- goto probe_free_host ;
870
- }
866
+ mmc = devm_mmc_alloc_host (& pdev -> dev , sizeof (struct spmmc_host ));
867
+ if (!mmc )
868
+ return - ENOMEM ;
871
869
872
870
host = mmc_priv (mmc );
873
871
host -> mmc = mmc ;
@@ -938,11 +936,6 @@ static int spmmc_drv_probe(struct platform_device *pdev)
938
936
939
937
clk_disable :
940
938
clk_disable_unprepare (host -> clk );
941
-
942
- probe_free_host :
943
- if (mmc )
944
- mmc_free_host (mmc );
945
-
946
939
return ret ;
947
940
}
948
941
@@ -956,7 +949,6 @@ static int spmmc_drv_remove(struct platform_device *dev)
956
949
pm_runtime_put_noidle (& dev -> dev );
957
950
pm_runtime_disable (& dev -> dev );
958
951
platform_set_drvdata (dev , NULL );
959
- mmc_free_host (host -> mmc );
960
952
961
953
return 0 ;
962
954
}
You can’t perform that action at this time.
0 commit comments