linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Pawel Moll <pawel.moll@arm.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: paul@pwsan.com, Pawel Moll <pawel.moll@arm.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Stephen Warren <swarren@wwwdotorg.org>,
	Catalin Marinas <Catalin.Marinas@arm.com>,
	Peter De Schrijver <pdeschrijver@nvidia.com>,
	Anton Vorontsov <anton@enomsg.org>,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Chris Ball <chris@printf.net>,
	linux-tegra@vger.kernel.org, arm@kernel.org,
	Olof Johansson <olof@lixom.net>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	linuxppc-dev@lists.ozlabs.org,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/5] mmc: sdhci-pltfm: Do not use parent as the host's device
Date: Fri, 25 Jul 2014 15:23:51 +0100	[thread overview]
Message-ID: <1406298233-27876-3-git-send-email-pawel.moll@arm.com> (raw)
In-Reply-To: <1406298233-27876-1-git-send-email-pawel.moll@arm.com>

The code selecting a device for the sdhci host has been
continuously tweaked (4b711cb13843f5082e82970dd1e8031383134a65
"mmc: sdhci-pltfm: Add structure for host-specific data" and
a4d2177f00a5252d825236c5124bc1e9918bdb41 "mmc: sdhci-pltfm: dt
device does not pass parent to sdhci_alloc_host") while there
does not seem to be any reason to use platform device's parent
in the first place.

The comment saying "Some PCI-based MFD need the parent here"
seem to refer to Timberdale FPGA driver (the only MFD driver
registering SDHCI cell, drivers/mfd/timberdale.c) but again,
the only situation when parent device matter is runtime PM,
which is not implemented for Timberdale.

Cc: Chris Ball <chris@printf.net>
Cc: Anton Vorontsov <anton@enomsg.org>
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-mmc@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
---

This patch is a part of effort to remove references to platform_bus
and make it static.

Chris, Anton, Ulf - could you please advise if the assumptions
above are correct or if I'm completely wrong? Do you know what
where the real reasons to use parent originally? The PCI comment
seems like a red herring to me...

 drivers/mmc/host/sdhci-pltfm.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
index 7e834fb..4996112 100644
--- a/drivers/mmc/host/sdhci-pltfm.c
+++ b/drivers/mmc/host/sdhci-pltfm.c
@@ -136,13 +136,8 @@ struct sdhci_host *sdhci_pltfm_init(struct platform_device *pdev,
 	if (resource_size(iomem) < 0x100)
 		dev_err(&pdev->dev, "Invalid iomem size!\n");
 
-	/* Some PCI-based MFD need the parent here */
-	if (pdev->dev.parent != &platform_bus && !np)
-		host = sdhci_alloc_host(pdev->dev.parent,
-			sizeof(struct sdhci_pltfm_host) + priv_size);
-	else
-		host = sdhci_alloc_host(&pdev->dev,
-			sizeof(struct sdhci_pltfm_host) + priv_size);
+	host = sdhci_alloc_host(&pdev->dev,
+		sizeof(struct sdhci_pltfm_host) + priv_size);
 
 	if (IS_ERR(host)) {
 		ret = PTR_ERR(host);
-- 
1.9.1

       reply	other threads:[~2014-07-25 14:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1406298233-27876-1-git-send-email-pawel.moll@arm.com>
2014-07-25 14:23 ` Pawel Moll [this message]
2014-08-08 16:36   ` [PATCH 3/5] mmc: sdhci-pltfm: Do not use parent as the host's device Pawel Moll
2014-08-11  9:07     ` Ulf Hansson
2014-08-11  9:15       ` Pawel Moll
2014-08-11  9:32         ` Ulf Hansson
2014-08-12  8:58           ` Ulf Hansson
2014-08-12 10:37             ` [PATCH 3/5 v2] " Pawel Moll
2014-08-12 11:51               ` Ulf Hansson
2014-08-11 10:02         ` [PATCH 3/5] " Russell King - ARM Linux

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1406298233-27876-3-git-send-email-pawel.moll@arm.com \
    --to=pawel.moll@arm.com \
    --cc=Catalin.Marinas@arm.com \
    --cc=anton@enomsg.org \
    --cc=arm@kernel.org \
    --cc=arnd@arndb.de \
    --cc=chris@printf.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=olof@lixom.net \
    --cc=paul@pwsan.com \
    --cc=pdeschrijver@nvidia.com \
    --cc=swarren@wwwdotorg.org \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).