From patchwork Fri Jul 25 14:23:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pawel Moll X-Patchwork-Id: 34284 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f197.google.com (mail-ie0-f197.google.com [209.85.223.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A2FBA235AB for ; Fri, 25 Jul 2014 14:24:50 +0000 (UTC) Received: by mail-ie0-f197.google.com with SMTP id rp18sf27380853iec.8 for ; Fri, 25 Jul 2014 07:24:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=UocWEwI0cbZU9WHasw2h2PLGH9IgUEdKvqvsJZykJvE=; b=bcjpmyuTHaYpwL4q2PX7nqZF7C9p3wrmygtBOUqy44Vl+g2bxYwzsNkF9jaJ6lDwT2 IcOklErbGbHyuhj4L7gKcRwhKCPvIZ4L1ZUHslAZMc7o2T3Y4qnHVHSRqp3Mj5YOOd0O x7YAMTGYMZDSM/NnD4WESqwkeXlhX42IQ0nu37sseZLhm0jjiAKXZISayCFvMn3aobQR cJp+jNo+zFzqTSQS7B41QQgeb//c7sVfTGoi+ueYkGL2GRqTHQXnOBliNdjSBXVCa8O8 wW6QzyhvMTlP1QsqAZ1wlAPWyoq0MmDYEVUNuLUxMNrQbg4U2Y0UBHUAQXevTHNUsWg9 2lQw== X-Gm-Message-State: ALoCoQllm/gE2TQTA3CSunyzAnP7xzpJifJfW80K1m4A+h7AWIufw9CNomahXXRFjzWfu8tSlFEc X-Received: by 10.50.33.18 with SMTP id n18mr2317554igi.8.1406298290193; Fri, 25 Jul 2014 07:24:50 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.34.44 with SMTP id k41ls1165509qgk.78.gmail; Fri, 25 Jul 2014 07:24:50 -0700 (PDT) X-Received: by 10.52.141.76 with SMTP id rm12mr2029194vdb.71.1406298290043; Fri, 25 Jul 2014 07:24:50 -0700 (PDT) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by mx.google.com with ESMTPS id f7si7529198vcs.34.2014.07.25.07.24.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 25 Jul 2014 07:24:50 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.181 as permitted sender) client-ip=209.85.220.181; Received: by mail-vc0-f181.google.com with SMTP id lf12so7423651vcb.26 for ; Fri, 25 Jul 2014 07:24:50 -0700 (PDT) X-Received: by 10.220.15.8 with SMTP id i8mr2701998vca.45.1406298289962; Fri, 25 Jul 2014 07:24:49 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp42024vcb; Fri, 25 Jul 2014 07:24:49 -0700 (PDT) X-Received: by 10.69.18.11 with SMTP id gi11mr19247977pbd.40.1406298289042; Fri, 25 Jul 2014 07:24:49 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id rc17si9384966pab.87.2014.07.25.07.24.48 for ; Fri, 25 Jul 2014 07:24:49 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760417AbaGYOYU (ORCPT + 14 others); Fri, 25 Jul 2014 10:24:20 -0400 Received: from fw-tnat.austin.arm.com ([217.140.110.23]:53798 "EHLO collaborate-mta1.arm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752994AbaGYOYS (ORCPT ); Fri, 25 Jul 2014 10:24:18 -0400 Received: from hornet.Cambridge.Arm.com (hornet.cambridge.arm.com [10.2.201.42]) by collaborate-mta1.arm.com (Postfix) with ESMTP id 363A713FA91; Fri, 25 Jul 2014 09:24:15 -0500 (CDT) From: Pawel Moll To: Greg Kroah-Hartman Cc: Olof Johansson , Stephen Warren , Catalin Marinas , paul@pwsan.com, Arnd Bergmann , Peter De Schrijver , arm@kernel.org, linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Pawel Moll , Chris Ball , Anton Vorontsov , Ulf Hansson , linux-mmc@vger.kernel.org, linuxppc-dev@lists.ozlabs.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 Message-Id: <1406298233-27876-3-git-send-email-pawel.moll@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1406298233-27876-1-git-send-email-pawel.moll@arm.com> References: <1406298233-27876-1-git-send-email-pawel.moll@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: pawel.moll@arm.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.181 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 Cc: Anton Vorontsov Cc: Ulf Hansson Cc: linux-mmc@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Pawel Moll --- 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);