summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-mt65xx.c
diff options
context:
space:
mode:
authorLeilk Liu <leilk.liu@mediatek.com>2015-08-19 11:37:57 +0800
committerMark Brown <broonie@kernel.org>2015-08-19 10:24:18 -0700
commitc5e5cd28d7c5a18d6da6575957dd0c5243ac3e7b (patch)
tree56597a042a4602cad7b78a6295ddaef1a87f7730 /drivers/spi/spi-mt65xx.c
parent39ba928f8b34720b60c68d4c1bb274ae219ab39e (diff)
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: Leilk Liu <leilk.liu@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-mt65xx.c')
-rw-r--r--drivers/spi/spi-mt65xx.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c
index 62baaad244af..546d70cc1e21 100644
--- a/drivers/spi/spi-mt65xx.c
+++ b/drivers/spi/spi-mt65xx.c
@@ -186,13 +186,6 @@ static int mtk_spi_prepare_hardware(struct spi_master *master)
struct spi_transfer *trans;
struct mtk_spi *mdata = spi_master_get_devdata(master);
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,
transfer_list);
@@ -201,15 +194,6 @@ static int mtk_spi_prepare_hardware(struct spi_master *master)
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;
}
@@ -541,7 +525,6 @@ static int mtk_spi_probe(struct platform_device *pdev)
master->set_cs = mtk_spi_set_cs;
master->prepare_transfer_hardware = mtk_spi_prepare_hardware;
- master->unprepare_transfer_hardware = mtk_spi_unprepare_hardware;
master->prepare_message = mtk_spi_prepare_message;
master->transfer_one = mtk_spi_transfer_one;
master->can_dma = mtk_spi_can_dma;