Commit c5e5cd28 authored by Leilk Liu's avatar Leilk Liu Committed by Mark Brown

spi: mediatek: remove redundant clock in prepare_hardware/unprepare_hardware

clock in prepare_hardware/unprepare_hardware is redundant
with pm_runtime, so remove them.
Signed-off-by: default avatarLeilk Liu <leilk.liu@mediatek.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 39ba928f
...@@ -186,13 +186,6 @@ static int mtk_spi_prepare_hardware(struct spi_master *master) ...@@ -186,13 +186,6 @@ static int mtk_spi_prepare_hardware(struct spi_master *master)
struct spi_transfer *trans; struct spi_transfer *trans;
struct mtk_spi *mdata = spi_master_get_devdata(master); struct mtk_spi *mdata = spi_master_get_devdata(master);
struct spi_message *msg = master->cur_msg; struct spi_message *msg = master->cur_msg;
int ret;
ret = clk_prepare_enable(mdata->spi_clk);
if (ret < 0) {
dev_err(&master->dev, "failed to enable clock (%d)\n", ret);
return ret;
}
trans = list_first_entry(&msg->transfers, struct spi_transfer, trans = list_first_entry(&msg->transfers, struct spi_transfer,
transfer_list); transfer_list);
...@@ -201,15 +194,6 @@ static int mtk_spi_prepare_hardware(struct spi_master *master) ...@@ -201,15 +194,6 @@ static int mtk_spi_prepare_hardware(struct spi_master *master)
mtk_spi_reset(mdata); mtk_spi_reset(mdata);
} }
return ret;
}
static int mtk_spi_unprepare_hardware(struct spi_master *master)
{
struct mtk_spi *mdata = spi_master_get_devdata(master);
clk_disable_unprepare(mdata->spi_clk);
return 0; return 0;
} }
...@@ -541,7 +525,6 @@ static int mtk_spi_probe(struct platform_device *pdev) ...@@ -541,7 +525,6 @@ static int mtk_spi_probe(struct platform_device *pdev)
master->set_cs = mtk_spi_set_cs; master->set_cs = mtk_spi_set_cs;
master->prepare_transfer_hardware = mtk_spi_prepare_hardware; master->prepare_transfer_hardware = mtk_spi_prepare_hardware;
master->unprepare_transfer_hardware = mtk_spi_unprepare_hardware;
master->prepare_message = mtk_spi_prepare_message; master->prepare_message = mtk_spi_prepare_message;
master->transfer_one = mtk_spi_transfer_one; master->transfer_one = mtk_spi_transfer_one;
master->can_dma = mtk_spi_can_dma; master->can_dma = mtk_spi_can_dma;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment