From patchwork Mon May 29 15:45:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 100671 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp395220qge; Mon, 29 May 2017 08:47:10 -0700 (PDT) X-Received: by 10.98.252.8 with SMTP id e8mr18841857pfh.190.1496072830488; Mon, 29 May 2017 08:47:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496072830; cv=none; d=google.com; s=arc-20160816; b=VFhL7ytvQ+aX8wWPx0LQybdDey9ltAuQnN2KyP0iuZ6BCSSsDHlRphj/28jrbdvNTj 79kculygyPbJ5CmH10LIW0u/DoFZTJDKH0CjAJntFr95ekht7Q6ea4MRET9YHExT7Y0M 5/JRKKXaB4ABlW3L3b/OlULX6b+gJ7/4qAPTz1GQ39JDvDgCuCZMd4cGJo7jsmCtxlDk VNjhQlwirn1vOjRQ/0bsu2GRXif8Pnvnen9F/imsyhwhiz+b+J3pUzTTXF99oaiZo6hU DsbpA7FzTNgAvIPNW+Obg5OZY2uykdditi/d7gjQyaQtq+aF9SjHcsfO8AqduyMiQeTd Da2Q== 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=ic5GYsgjRuYfWrGYocGqjkgVHzL538b2u/UM9ilYLgM=; b=akozGKwnG1sdawVzuwvpAgsWs4NO34pFTOQRA0DORbZyzAhr20nsQHjcg5YiVNgeO1 CmgDEcaPWhZk6UGaRg/f+ubmqyoT0aThuZXbJLqwlFm9t0VtcapDmnQNPnXkRwDfSEUo KMtrnC67X4TSrpuFHDrdYlrjo5XkGkqqJybKsD0LYC3NkrVs5b+Cd7cqxeBSY9CKhXde ekJbaDN4DYjxla+vugHkDFskLR+HKF2MIkYLEQWPjiLQ5I14W3QPjQaJPjCvuOqrsT9v ksGg3NysUIBaHocbv+jzxmS346PgJ9vKYioxGh/CgLtuI/p2k6GbWhPBkMXim9sNvGiF qG4A== 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 x66si10669909pgb.146.2017.05.29.08.47.10; Mon, 29 May 2017 08:47:10 -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 S1751444AbdE2PrC (ORCPT + 25 others); Mon, 29 May 2017 11:47:02 -0400 Received: from mail-wm0-f46.google.com ([74.125.82.46]:36304 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751407AbdE2Pq4 (ORCPT ); Mon, 29 May 2017 11:46:56 -0400 Received: by mail-wm0-f46.google.com with SMTP id 7so60661798wmo.1 for ; Mon, 29 May 2017 08:46:45 -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=ic5GYsgjRuYfWrGYocGqjkgVHzL538b2u/UM9ilYLgM=; b=SHno9MpbpyHpXeOh9nv2FfyI3yiJoWc/H1KyU2LyG7ZSNZfyZzaGZuZ1IeWLvkuVKL 7T68wHZY7MOIhgLUFrYNygRFvsGyiGOUwpfxOvqQLvHA4FLoggKKkAreQNS3+lzMCJK5 okmYT4OVKSPT4qtNvqkjvB5+ew9ITrHpdf9/M= 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=ic5GYsgjRuYfWrGYocGqjkgVHzL538b2u/UM9ilYLgM=; b=NsU6GdtZFGpDqsmk7elQ7TpNjaELJHIt+T1+b6VS/uIJ/AwT3gpv5yi2YwVxrMr5rJ ypOAH2KJ9Coc2o1OspnZYWsxM3LMPRPf846DqgLEWxGbYcw7nD3Q7kffOBpVkagLm81S qbkHxDW1uCRBKCJhZJSuPYGsgYoBmw3ZAisIQovsuIX6MLwb8JFZ+oL4RoTYArYktSf/ iz38nNwk+nbjbPVTgH+v0KPcMOj7GSO+4gaXL3/zg/RePnd6JPppQ2uedm8ie2LNeGer z74yFOGhEWXMHn4CbS3VeIr2t1o+Dtc83ku6PZcXgU7ErSsYaZGBOAiZL93/aYtms+6r xXDw== X-Gm-Message-State: AODbwcDBx4JjuoeoH/nK0ORkLNLzj94WqLY5MOl7VnjWmCPpCQf8Efj8 VFtV4oOkXsQ8U3a+ X-Received: by 10.28.54.91 with SMTP id d88mr10320688wma.9.1496072799762; Mon, 29 May 2017 08:46:39 -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.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 May 2017 08:46:39 -0700 (PDT) From: Benjamin Gaignard Cc: Benjamin Gaignard , Tony Lindgren , Lee Jones , linux-kernel@vger.kernel.org Subject: [PATCH 11/15] mfd: palmas: use devm_of_platform_populate() Date: Mon, 29 May 2017 17:45:59 +0200 Message-Id: <1496072763-31209-12-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: Tony Lindgren CC: Lee Jones CC: linux-kernel@vger.kernel.org --- drivers/mfd/palmas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.9.1 diff --git a/drivers/mfd/palmas.c b/drivers/mfd/palmas.c index 9103aff..3922a93 100644 --- a/drivers/mfd/palmas.c +++ b/drivers/mfd/palmas.c @@ -676,7 +676,7 @@ static int palmas_i2c_probe(struct i2c_client *i2c, * otherwise continue and add devices using mfd helpers. */ if (node) { - ret = of_platform_populate(node, NULL, NULL, &i2c->dev); + ret = devm_of_platform_populate(&i2c->dev); if (ret < 0) { goto err_irq; } else if (pdata->pm_off && !pm_power_off) {