From patchwork Tue Aug 12 10:37:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pawel Moll X-Patchwork-Id: 35247 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oi0-f71.google.com (mail-oi0-f71.google.com [209.85.218.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id F3FA0203C5 for ; Tue, 12 Aug 2014 10:38:20 +0000 (UTC) Received: by mail-oi0-f71.google.com with SMTP id e131sf38811677oig.10 for ; Tue, 12 Aug 2014 03:38:20 -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=XHHDPDn2YK/gFCCVk2g3XFSkPgPSMdfAopaRlwA+g4M=; b=l8z4ia3o1SxPjnbZFVR40C20j6hUWRuC9Cei1tGYReNAKvCVUxnqch//2+ifTGKydX /6JpuoY8zLrQOAM4jsaHWaLU8FkyPrtamCt+Rz50n66dByCVipJsb91E0doXMkad+XWN hfvR2zC89+OpcePE6Zqqe458hAI+GwOGbY8AP4a93kc7U2u/WqwzQV2sxoM+lu14mZzj mPlOLz9DWow2bH89/NFfE8MKTyu+mGX8YIE6J9OnS6oPLK1K42YmZ2s9EUfuamB8TKCf Hnvs93RvefqXCHQ+DR3GPuLr8GLkyWDo5emQJbAxAaZvI5sbeHDQoPYzOg1ltwT24o8K A+GQ== X-Gm-Message-State: ALoCoQkM4gdJE+1u8mqQ5Qb+uGByL1D48xzCh/x/HRU8Yuk5mUylVCebNsxWEbvXbkSakRx8ApD2 X-Received: by 10.182.245.198 with SMTP id xq6mr507156obc.40.1407839900533; Tue, 12 Aug 2014 03:38:20 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.81.200 with SMTP id f66ls55503qgd.24.gmail; Tue, 12 Aug 2014 03:38:20 -0700 (PDT) X-Received: by 10.220.172.8 with SMTP id j8mr2947802vcz.32.1407839900435; Tue, 12 Aug 2014 03:38:20 -0700 (PDT) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id ur3si7972656vcb.43.2014.08.12.03.38.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Aug 2014 03:38:20 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.174 as permitted sender) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id la4so13157814vcb.33 for ; Tue, 12 Aug 2014 03:38:20 -0700 (PDT) X-Received: by 10.220.184.70 with SMTP id cj6mr2906346vcb.5.1407839900349; Tue, 12 Aug 2014 03:38:20 -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 tc5csp237084vcb; Tue, 12 Aug 2014 03:38:19 -0700 (PDT) X-Received: by 10.66.254.166 with SMTP id aj6mr3569705pad.11.1407839899141; Tue, 12 Aug 2014 03:38:19 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y10si12161791pdn.58.2014.08.12.03.38.18 for ; Tue, 12 Aug 2014 03:38:19 -0700 (PDT) Received-SPF: none (google.com: linux-mmc-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 S1751761AbaHLKiR (ORCPT + 4 others); Tue, 12 Aug 2014 06:38:17 -0400 Received: from fw-tnat.austin.arm.com ([217.140.110.23]:53773 "EHLO collaborate-mta1.arm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751479AbaHLKiR (ORCPT ); Tue, 12 Aug 2014 06:38:17 -0400 Received: from hornet.Cambridge.Arm.com (hornet.cambridge.arm.com [10.2.201.42]) by collaborate-mta1.arm.com (Postfix) with ESMTP id 626BB13F91D; Tue, 12 Aug 2014 05:38:10 -0500 (CDT) From: Pawel Moll To: Ulf Hansson Cc: Chris Ball , Anton Vorontsov , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Pawel Moll Subject: [PATCH 3/5 v2] mmc: sdhci-pltfm: Do not use parent as the host's device Date: Tue, 12 Aug 2014 11:37:52 +0100 Message-Id: <1407839872-12864-1-git-send-email-pawel.moll@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: Sender: linux-mmc-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-mmc@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.174 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. Signed-off-by: Pawel Moll --- drivers/mmc/host/sdhci-pltfm.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c index 7e834fb..c5b01d6 100644 --- a/drivers/mmc/host/sdhci-pltfm.c +++ b/drivers/mmc/host/sdhci-pltfm.c @@ -123,7 +123,6 @@ struct sdhci_host *sdhci_pltfm_init(struct platform_device *pdev, size_t priv_size) { struct sdhci_host *host; - struct device_node *np = pdev->dev.of_node; struct resource *iomem; int ret; @@ -136,13 +135,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);