Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933587AbcLTFxq (ORCPT ); Tue, 20 Dec 2016 00:53:46 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:42196 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933416AbcLTFxk (ORCPT ); Tue, 20 Dec 2016 00:53:40 -0500 DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org 6109F61557 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=pass smtp.mailfrom=riteshh@codeaurora.org From: Ritesh Harjani To: ulf.hansson@linaro.org, adrian.hunter@intel.com Cc: linux-mmc@vger.kernel.org, shawn.lin@rock-chips.com, linux-kernel@vger.kernel.org, stummala@codeaurora.org, georgi.djakov@linaro.org, linux-arm-msm@vger.kernel.org, pramod.gurav@linaro.org, jeremymc@redhat.com, venkatg@codeaurora.org, asutoshd@codeaurora.org, Ritesh Harjani Subject: [PATCH 1/4] mmc: core: Return from mmc_set_clock if hz is already set to ios.clock Date: Tue, 20 Dec 2016 11:23:16 +0530 Message-Id: <1482213199-29152-2-git-send-email-riteshh@codeaurora.org> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1482213199-29152-1-git-send-email-riteshh@codeaurora.org> References: <1482213199-29152-1-git-send-email-riteshh@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 615 Lines: 22 Signed-off-by: Ritesh Harjani --- drivers/mmc/core/core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 543eadd..125f8a9 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -1139,6 +1139,9 @@ void mmc_set_clock(struct mmc_host *host, unsigned int hz) if (hz > host->f_max) hz = host->f_max; + if (hz == host->ios.clock) + return; + host->ios.clock = hz; mmc_set_ios(host); } -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.