From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754945AbcCAX4f (ORCPT ); Tue, 1 Mar 2016 18:56:35 -0500 Received: from mail333.us4.mandrillapp.com ([205.201.137.77]:56744 "EHLO mail333.us4.mandrillapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755949AbcCAX43 (ORCPT ); Tue, 1 Mar 2016 18:56:29 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=mandrill; d=linuxfoundation.org; b=epQp22t47Eo2NSUEz7/7a6QXjiQDwOmpYwHq3ojdZMPzX9NQaFHva0s8NrsK8q2/rob5RTiTfN8l TEp9HFqckNY8vwq+JhzE3st85z55iJgCJXySI7hAdLLUDqOF5KMZAG5p+ix2B2eDBTQJnIEbSfVi YqKp64jhdHK0LFN+oiU=; From: Greg Kroah-Hartman Subject: [PATCH 4.4 144/342] mmc: sdhci: Allow override of get_cd() called from sdhci_request() X-Mailer: git-send-email 2.7.2 To: Cc: Greg Kroah-Hartman , , Adrian Hunter , Ulf Hansson Message-Id: <20160301234532.625140480@linuxfoundation.org> In-Reply-To: <20160301234527.990448862@linuxfoundation.org> References: <20160301234527.990448862@linuxfoundation.org> X-Report-Abuse: Please forward a copy of this message, including all headers, to abuse@mandrill.com X-Report-Abuse: You can also report abuse here: http://mandrillapp.com/contact/abuse?id=30481620.6a1d4bfea0ee47b1ae63bd7ab9cb7f00 X-Mandrill-User: md_30481620 Date: Tue, 01 Mar 2016 23:54:31 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Adrian Hunter commit 8d28b7a72fe18bcdcdb047243ba8fec36b149955 upstream. Drivers may need to provide their own get_cd() mmc host op, but currently the internals of the current op (sdhci_get_cd()) are provided by sdhci_do_get_cd() which is also called from sdhci_request(). To allow override of the get_cd functionality, change sdhci_request() to call ->get_cd() instead of sdhci_do_get_cd(). Note, in the future the call to ->get_cd() will likely be removed from sdhci_request() since most drivers don't need actually it. However this change is being done now to facilitate a subsequent bug fix. Signed-off-by: Adrian Hunter Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/host/sdhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1367,7 +1367,7 @@ static void sdhci_request(struct mmc_hos sdhci_runtime_pm_get(host); /* Firstly check card presence */ - present = sdhci_do_get_cd(host); + present = mmc->ops->get_cd(mmc); spin_lock_irqsave(&host->lock, flags);