From patchwork Mon May 29 15:45:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 100669 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp395173qge; Mon, 29 May 2017 08:47:02 -0700 (PDT) X-Received: by 10.99.1.85 with SMTP id 82mr20154922pgb.74.1496072822143; Mon, 29 May 2017 08:47:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496072822; cv=none; d=google.com; s=arc-20160816; b=BpHLvPQdBQHTXXsbk5HnrXyYdBHMEzD2Fc6hOuWppPty/o18xzCszhKsmAv6lB3nPZ w7NMOHu0yeOVlCofkWkscEI/+804VCmIYhH7aOgUN7BGBRH3ZcbiUQjfufK2MkxjmKNg U4e9CpB2LzpctdwmTpXsjb35c1LAxnHlukQ/SGXsbyxwB3HK0Vrg2n9xlOcpECcFPL8p o3ov79f79AUbCZWANRGvLZz4EPRlqceNdY49ESy0hoov7btOWR7LbDndh9GqRBfx9EqB SmjaZX20I2ok+3W7JyLuzwq5gA7AN/ogUQyLQO9AqDzvgWQs8e51JJ7nGrc0KcHCCxhZ iVJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:in-reply-to:message-id:date :subject:cc:from:dkim-signature:arc-authentication-results; bh=Sihy87fcOZ5lGueDGJONrSZYaf+3xCKaP1N3dj1v/v4=; b=D5uW8+809C4iZg805G+53n2GFT6L0StJMqw6ZrnmaNnk3ZhBS7eFOvPSLp4Dy0+FS5 kNHw6H/kSwo7dEnabrb2t0iYAeRAXKpbkFOnAQ5IFZDGILt2+NB91kWHqj5Z8iRZqFIP eGVVBkfiNon741y6TQn6pvLEml1IY0MSdjX6XQfYQ45dE8BXsdL6or4p419Oh8fwAibu MTjXAOJ0sD5izEZR+/bvPF2eV3RUWUt/VcGKIODRPKoKwU032Q7W+9je/79Nj+WdKJiy tbMveSRMLG8WGb+Ck0Cr4Af8uNrN19MTJ4pOmUbaHcjGmLnWkIVfk8YRySJMzyBwo4Pl 9ptA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 190si9455906pgi.411.2017.05.29.08.47.01; Mon, 29 May 2017 08:47:02 -0700 (PDT) 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=fail header.i=@linaro.org; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751405AbdE2Pqw (ORCPT + 25 others); Mon, 29 May 2017 11:46:52 -0400 Received: from mail-wm0-f48.google.com ([74.125.82.48]:35397 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751383AbdE2Pqs (ORCPT ); Mon, 29 May 2017 11:46:48 -0400 Received: by mail-wm0-f48.google.com with SMTP id b84so60810180wmh.0 for ; Mon, 29 May 2017 08:46:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Sihy87fcOZ5lGueDGJONrSZYaf+3xCKaP1N3dj1v/v4=; b=LfDxA+ezgWFIJhZZajYC6UtJW0KJRxcFZF+xuafugjHn2LN6aFh/5Lu3bQ/uhU4mfE wdk2Ds+pw3sSSpT0S8kRj17FVOgsvzCydVJYeFwLXikaRsh+pvGuy/tmBfVUQjrZsqh+ kAxp0L3gmyrR2K+P64MEmiOu16jYnQ+h3Ie6g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Sihy87fcOZ5lGueDGJONrSZYaf+3xCKaP1N3dj1v/v4=; b=hvAkCyhCVHqiZn9WnBavG1OaE6vtRfBZzMwTuyA4Hf4AbiMxL08NLlxPf3cGwdX64k PyNytMYxhCJ+gTwtRqMu1ghGXLBHbKBiQ/dKB5HfjEuYhsCr+XIlIvaJ2nc8+Ew1UFBF 42TCbcDqS/J7qn5kyB84PP93sdXcnLDcOPly0WSv3LwEnipeuEE2uw2M7Vrm1ReZrqH9 VtIefMT1hfiCCd4U6plOy1gNdt58WJQJHo3yuAx6ZC7lAncNbzV7nTujSThQVi96tvyD 4GfeIcst9XBTDZebFVRVt+xHNnwNVJUCuilXjXrNea0r/PQupAiU63vlQRJpZYtNdfuh +nFQ== X-Gm-Message-State: AODbwcBrp/3u9CB2Mhgq9BtcMmcUIM7BlYyfZbsod3ups12ToDYn6UB2 Uw3j6/nJJ6sAfkVc X-Received: by 10.223.181.147 with SMTP id c19mr10262434wre.45.1496072797319; Mon, 29 May 2017 08:46:37 -0700 (PDT) Received: from lmenx321.st.com. ([80.215.227.188]) by smtp.gmail.com with ESMTPSA id 79sm13210721wmo.13.2017.05.29.08.46.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 May 2017 08:46:36 -0700 (PDT) From: Benjamin Gaignard Cc: Benjamin Gaignard , Lee Jones , linux-kernel@vger.kernel.org Subject: [PATCH 09/15] mfd: fsl-imx25: use devm_of_platform_populate() Date: Mon, 29 May 2017 17:45:57 +0200 Message-Id: <1496072763-31209-10-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1496072763-31209-1-git-send-email-benjamin.gaignard@linaro.org> References: <1496072763-31209-1-git-send-email-benjamin.gaignard@linaro.org> To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use devm_of_platform_populate() to be sure that of_platform_depopulate is called when removing the driver. Signed-off-by: Benjamin Gaignard CC: Lee Jones CC: linux-kernel@vger.kernel.org --- drivers/mfd/fsl-imx25-tsadc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) -- 1.9.1 diff --git a/drivers/mfd/fsl-imx25-tsadc.c b/drivers/mfd/fsl-imx25-tsadc.c index ac430a3..4258a42 100644 --- a/drivers/mfd/fsl-imx25-tsadc.c +++ b/drivers/mfd/fsl-imx25-tsadc.c @@ -129,7 +129,6 @@ static void mx25_tsadc_setup_clk(struct platform_device *pdev, static int mx25_tsadc_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct device_node *np = dev->of_node; struct mx25_tsadc *tsadc; struct resource *res; int ret; @@ -178,9 +177,7 @@ static int mx25_tsadc_probe(struct platform_device *pdev) platform_set_drvdata(pdev, tsadc); - of_platform_populate(np, NULL, NULL, dev); - - return 0; + return devm_of_platform_populate(dev); } static const struct of_device_id mx25_tsadc_ids[] = {