From patchwork Mon May 29 15:45:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 100674 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp395664qge; Mon, 29 May 2017 08:48:30 -0700 (PDT) X-Received: by 10.84.137.3 with SMTP id 3mr76430660plm.68.1496072910107; Mon, 29 May 2017 08:48:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496072910; cv=none; d=google.com; s=arc-20160816; b=isb24dVi3lXc/C7MkwQKxD4012YSU0h9j+QNc5TwdNpXQ89ZLtzW40xJUBLdFl1Ucu LJm02uicBwhp5d/wr7kpQfv6tDvbeAApMjz6b6B3QWqPyURRGimlTo6jqybQ0s625JWH 1TiQx1ldwrR522BsiAyp12IFrss3I5Cg0JQVbVzHaKCNiZHrl5g+EopPl2COZLVUOp6c M6FjslwA6TgY93QDHoJXOwPcggwslFoToETI9OLmJiy8QuCGpZRNzSlwhfmmm3z/P1Ib P0tOalf72nqELufNqkeFfoTApfYJ2Chz7JQmc90GPvnIcRTzVWJq98ZW3mLS8cosBa7s uCbw== 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=SDpFi6O6wtsS+hwRjfN6oHZJ5RBPo44/WiuhSnTuw8g=; b=MgDSfK2BFDQRLXRoS5C9/3a2EVyoA0TYUtiVMNK9TctINcjIKVvtaPjxwrTGv6moSv /Ya/Un9QjBDQNiC2prTt7luf03S8SszhMpFfG8bw8ZgoqYfXw+3dUVXiXpHtu/T67ULU LIWRhc5STYs13lDswOP7Oa0tO3FKg5DqFbmYcqTb/CD4kxLyDPz+kd4VY3puzZBzBoUn IWQaiSr8ywLC40PDjpyCUGzN7Yyqbr11VtpywKTHZkDi0pvzWDqlp/qfZkOr833b2746 CLUsKDDwBC2nolo1DzMJB5+JBks9D5/OJuGAJbv6gMdUzMbRr6NQXYBI013OAs3In3RU N2UA== 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 u140si10322095pgb.25.2017.05.29.08.48.29; Mon, 29 May 2017 08:48:30 -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 S1751473AbdE2PsW (ORCPT + 25 others); Mon, 29 May 2017 11:48:22 -0400 Received: from mail-wm0-f46.google.com ([74.125.82.46]:37074 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751308AbdE2Pqk (ORCPT ); Mon, 29 May 2017 11:46:40 -0400 Received: by mail-wm0-f46.google.com with SMTP id d127so64530662wmf.0 for ; Mon, 29 May 2017 08:46:35 -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=SDpFi6O6wtsS+hwRjfN6oHZJ5RBPo44/WiuhSnTuw8g=; b=IkqJFCt/tUJGaGh8WstZS3/535gpJ8lNUpQMdCekXdMTHFx1cYHESSVx2txRqs3vYk 0YZNoFkGDMuPAVfZbeaXoshL+4uAuCKSF2tCAwyyo14boyfcm50lQaKSF0MDZifR2tuY TD53E9Xy4n4nsS+yz/qVk2zdpnoKj12VSEhdk= 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=SDpFi6O6wtsS+hwRjfN6oHZJ5RBPo44/WiuhSnTuw8g=; b=eYAqtyUus/OF9uQcK74rKkRaHQyNionN9B5bMGXo9ISaGinmNziF2Yf/Jz3zaYWpsa lVLNEtT8JXarXPvvDHHJQFjoLGs0w5Ar5lgV5oGkkqo09qkowAAUEFjLvRaHrLLs0ac7 i0llhlk4A510tNon1UoxaHtO6MwSWWyV/Hoz1c41jPlUHg1vTCRqLRLQRgvbzEtB/TbV IDAxRpS4T2pJ25njQ7a2guQtA2GRhiavNDPP0qzr+83HtQUu5ZwlLJaThOrsrbVa13tN CZVrhT+j7y6EXN0orYXWqqCVd5F29iYBHE8jje4fWHiATVt8tVwh3cxN0dCZAkBzE89T 1xsQ== X-Gm-Message-State: AODbwcCMa7d7aArIjwd+sqaU30ywmqYsoXbOiVXX7U0TEztlTin2Fkp5 zHaKIs/4dvMJmTR3 X-Received: by 10.223.134.22 with SMTP id 22mr10224333wrv.182.1496072794419; Mon, 29 May 2017 08:46:34 -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.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 May 2017 08:46:33 -0700 (PDT) From: Benjamin Gaignard Cc: Benjamin Gaignard , Lee Jones , linux-kernel@vger.kernel.org Subject: [PATCH 07/15] mfd: cros_ec: use devm_of_platform_populate() Date: Mon, 29 May 2017 17:45:55 +0200 Message-Id: <1496072763-31209-8-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/cros_ec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.9.1 diff --git a/drivers/mfd/cros_ec.c b/drivers/mfd/cros_ec.c index d4a407e..e31ac60 100644 --- a/drivers/mfd/cros_ec.c +++ b/drivers/mfd/cros_ec.c @@ -147,7 +147,7 @@ int cros_ec_register(struct cros_ec_device *ec_dev) } if (IS_ENABLED(CONFIG_OF) && dev->of_node) { - err = of_platform_populate(dev->of_node, NULL, NULL, dev); + err = devm_of_platform_populate(dev); if (err) { mfd_remove_devices(dev); dev_err(dev, "Failed to register sub-devices\n");