From patchwork Tue Dec 20 05:53:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ritesh Harjani X-Patchwork-Id: 9481147 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C27EE601C0 for ; Tue, 20 Dec 2016 05:53:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B46DC27D4D for ; Tue, 20 Dec 2016 05:53:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A8BAD284E6; Tue, 20 Dec 2016 05:53:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3D98627D4D for ; Tue, 20 Dec 2016 05:53:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933433AbcLTFxp (ORCPT ); Tue, 20 Dec 2016 00:53:45 -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 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 0771161557; Tue, 20 Dec 2016 05:53:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1482213220; bh=Sl5gzwGGflctwMw3s7rJuVBcRXE+tEzFQeKwWCabTrs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GjBOJ2XqIWGVUmFXbtrOffkMAjajE1j3//cUYK7ro1cojROcaep6rikvolkxyK97C 0pGwG5dZzkMseGkDMJEIdJyaIs0cbWSlEsI/d+vpOoLeeQ0GCWP8/3QNwYy6ch9srx 2EC5AKryBM4EMcH+mxcELajGqtwyIl4G553zlFJE= Received: from rharjani-linux.qualcomm.com (unknown [202.46.23.54]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: riteshh@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 6109F61557; Tue, 20 Dec 2016 05:53:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1482213219; bh=Sl5gzwGGflctwMw3s7rJuVBcRXE+tEzFQeKwWCabTrs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jaBiAlJp+HFtSWlSHQrFl3dvCZZTPB2TacXHc0NZlZcDcs5nQYAw5erXB11dXlbWJ t1Fawy4+4rtY/NpkcyKeyo23JBco/7Y6FtGMHKBX/56d4a3cUSxvJdDHEmksPZj91J KjLsAabmixnK17aZo0OXJJBmNDP4yZgcpw0mlmS4= 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-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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); }