From patchwork Wed Aug 19 03:37:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leilk Liu X-Patchwork-Id: 7034801 Return-Path: X-Original-To: patchwork-linux-mediatek@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3A94A9F372 for ; Wed, 19 Aug 2015 03:38:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 404D220836 for ; Wed, 19 Aug 2015 03:38:55 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4BB4F20780 for ; Wed, 19 Aug 2015 03:38:54 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZRuDF-0007JO-Cv; Wed, 19 Aug 2015 03:38:53 +0000 Received: from [210.61.82.184] (helo=mailgw02.mediatek.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZRuDD-0007GD-Lc; Wed, 19 Aug 2015 03:38:52 +0000 X-Listener-Flag: 11101 Received: from mtkhts07.mediatek.inc [(172.21.101.69)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 307642798; Wed, 19 Aug 2015 11:38:33 +0800 Received: from mhfsdcap03.mhfswrd (10.17.3.153) by mtkhts07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 14.3.181.6; Wed, 19 Aug 2015 11:38:31 +0800 From: Leilk Liu To: Mark Brown Subject: [PATCH 2/3] spi: mediatek: remove redundant clock in prepare_hardware/unprepare_hardware Date: Wed, 19 Aug 2015 11:37:57 +0800 Message-ID: <1439955478-2733-3-git-send-email-leilk.liu@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1439955478-2733-1-git-send-email-leilk.liu@mediatek.com> References: <1439955478-2733-1-git-send-email-leilk.liu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150818_203851_926114_46C3FB71 X-CRM114-Status: GOOD ( 15.03 ) X-Spam-Score: -1.1 (-) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Leilk Liu , Sascha Hauer , linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, linux-mediatek@lists.infradead.org, Matthias Brugger , linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP clock in prepare_hardware/unprepare_hardware is redundant with pm_runtime, so remove them. Signed-off-by: Leilk Liu --- drivers/spi/spi-mt65xx.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c index 814bca4..1c2b215 100644 --- a/drivers/spi/spi-mt65xx.c +++ b/drivers/spi/spi-mt65xx.c @@ -181,13 +181,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); @@ -196,15 +189,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; } @@ -537,7 +521,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;