Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3486550imu; Sun, 11 Nov 2018 16:11:39 -0800 (PST) X-Google-Smtp-Source: AJdET5d6tgoG+ucnSG+nkmA7Ge2eRRRIYMby34bsmQBHkq+LZpVUdB1vYpgZYv4U4Hrj5+rBM24b X-Received: by 2002:a62:440e:: with SMTP id r14-v6mr14363941pfa.185.1541981499018; Sun, 11 Nov 2018 16:11:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541981498; cv=none; d=google.com; s=arc-20160816; b=hLqv9rqA3Q5D73DKCHMaUhuiEIWY6Sw99FTnXfTHmAjsyJix3PGJq7hPwMeV9GXzzA cI6duUR80c+QgUzMxfUUhLslRGngqrSkGUX2Ur8KCcUc1W2OABAJRFYWsDVVS7LA34Qd 6u+q3aLbXHxbSb1K07qnx3roiyqbhE5I5HIdNBY37SJXFW5/HxQuEjTwd9UXXR+EyjR6 QZ/j94kJYEviqMp63Q8J8XgzZUe1fVOB4MWHUez2x8LI8gqdZgPxfKgex4ox7LzxaylL LYnrDMzgxJYy4XrcX2iI8eLMzxl5mlefWbbozQ1jDXQc7MgVfNmUsd5dKr/yFmqM/mG5 A8fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=O8O0QBBALkZZxhkPuvIRCcxWKNnGpLRRxtvkg14Zm8k=; b=p/2MJldLhNEVFziQorMiaRQzIwUjqZGBR4mrDleIW+213h9xgFj4oi80P+dMk9uDKk mCVKgym8VAEGcwnLCTl6Lx/U0P2Cw4ncEUpVsWD8a6JiMOGKj5Xzbz1Lh9OjfRpqs4vP GLFIqJ5fxM+PDKtsUJ4TzCdbbJwJt3VfZeaC/3pTfViRvcUvTmQ9wIiyqCLXNs1XIIae sh/oCSTE4uIvdlMfEL+SyNbk64U4beuYxiGjvXZV+vwebjjSuoUjgNFt6FxecXETO8ta oup+HjcIgmSp5L+5e0KT4opc/jxxSzXl69kXn48LYdF/JD5noCx4FBf9T8dGjx0ujNGi ggnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ak7JrzJN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h20si14250805pgm.366.2018.11.11.16.11.24; Sun, 11 Nov 2018 16:11:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ak7JrzJN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731806AbeKLKBb (ORCPT + 99 others); Mon, 12 Nov 2018 05:01:31 -0500 Received: from mail.kernel.org ([198.145.29.99]:60196 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730730AbeKLIRX (ORCPT ); Mon, 12 Nov 2018 03:17:23 -0500 Received: from localhost (unknown [206.108.79.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D59E5214E0; Sun, 11 Nov 2018 22:27:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975247; bh=8yOPprj1BOkY2RlY56pHOWDxuqiMh5pfPNjrmDQEQ8U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ak7JrzJNAdZ0/9uyBVtOB5QuLr/pYES1P9nOvXzlwM0zSj9DySN/lwtE3KmVu6Ite GaYVO78us4bpxhkMZ+jQt1XZA/nIK7Pbd6rUstlFU0Ut1PyvAeBlnnw8nwWS6z1pqN yGmswNeGcPZes7iCyjUzMsEoHcGY6P2o+a4D1zMk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wang Dongsheng , Adrian Hunter , Ulf Hansson , Sasha Levin Subject: [PATCH 4.19 071/361] sdhci: acpi: add free_slot callback Date: Sun, 11 Nov 2018 14:16:58 -0800 Message-Id: <20181111221630.001440912@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Wang Dongsheng [ Upstream commit c7eabbee3de99347105faa7fd925a500ccf43baf ] The device specific resource can be free in free_slot after removing host controller. Signed-off-by: Wang Dongsheng Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/host/sdhci-acpi.c | 8 ++++++++ 1 file changed, 8 insertions(+) --- a/drivers/mmc/host/sdhci-acpi.c +++ b/drivers/mmc/host/sdhci-acpi.c @@ -76,6 +76,7 @@ struct sdhci_acpi_slot { size_t priv_size; int (*probe_slot)(struct platform_device *, const char *, const char *); int (*remove_slot)(struct platform_device *); + int (*free_slot)(struct platform_device *pdev); int (*setup_host)(struct platform_device *pdev); }; @@ -756,6 +757,9 @@ static int sdhci_acpi_probe(struct platf err_cleanup: sdhci_cleanup_host(c->host); err_free: + if (c->slot && c->slot->free_slot) + c->slot->free_slot(pdev); + sdhci_free_host(c->host); return err; } @@ -777,6 +781,10 @@ static int sdhci_acpi_remove(struct plat dead = (sdhci_readl(c->host, SDHCI_INT_STATUS) == ~0); sdhci_remove_host(c->host, dead); + + if (c->slot && c->slot->free_slot) + c->slot->free_slot(pdev); + sdhci_free_host(c->host); return 0;