From patchwork Mon May 29 15:45:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 100666 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp395080qge; Mon, 29 May 2017 08:46:47 -0700 (PDT) X-Received: by 10.99.139.195 with SMTP id j186mr20105619pge.134.1496072807618; Mon, 29 May 2017 08:46:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496072807; cv=none; d=google.com; s=arc-20160816; b=s7CFap49CFEXctwukPyrbTmGRZJVp79eEa/tE+EqYfViaKbPF6hBwAaqTNKP2alS7E AYAqpl3so0r87N5Gk3m3kN+J6LavXpZUUG457/3GN1BssF9iEnT8NYbfuWPzrojolgjM 8ooIEvk90sZY/LChUVUnoPjAHoKcKmY5bPDTFS9NqnxkqMYp18mQH6xTVPT+kRKTp02U JLUSfM/pGnmP357AAwzDRavSH3603hIM9KXf0dGb0LFsCtxJ2qZ7ZdWEu25MzWf6+AZm 2SEe68Ie8QCy6pXDyKWjKI7NJVl4AwvHCBozh/+UyqHtRpkH14A7CMqG18LZRfxx/2xI Grbw== 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=lAvaXv7mOJzto88MZOIvjf/63HhAZgaKPx38ahvonMo=; b=vfrv+MXknULgMf/Bm0Z0Vz2oGscLR5A7R57aPWbo28yIKxCbFOliP8rn/xYjAEhOV1 vBCnAvuZ0Hkn4DOZI2k4dTOm7f+tR45gWraMnZQYyPMOxDdlmpvQwbjRgc9eG6xv+p7X kTFot4393DYvQuEpXPd+ttVamdDgYh8aFlK/8IHQ8v8ikYTcEylsU8rOu2EbOpwpBycO i5pU83uUC/2RJfWKET1McUsZS31+zqZgKM/+ehARNMJYyUOw6JSvCRhVxWcsbvuEXKFq PC9JG+8Aei4nJEx+hyVc30ZHrjXS0FEOES2UXiy41czt65SOmXPkzQDGs50c/ztymZWs Wiag== 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 o82si10870846pfi.82.2017.05.29.08.46.47; Mon, 29 May 2017 08:46:47 -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 S1751333AbdE2Pqm (ORCPT + 25 others); Mon, 29 May 2017 11:46:42 -0400 Received: from mail-wm0-f52.google.com ([74.125.82.52]:37181 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751187AbdE2Pqj (ORCPT ); Mon, 29 May 2017 11:46:39 -0400 Received: by mail-wm0-f52.google.com with SMTP id d127so64532824wmf.0 for ; Mon, 29 May 2017 08:46:39 -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=lAvaXv7mOJzto88MZOIvjf/63HhAZgaKPx38ahvonMo=; b=jY9BPHasff+zAuoLJH0AxjGjgLctPMA5AbMSo9N9JFnDyB1cHc5JuKj1mG44sKAJgN TYFucAQ0iTfZHtzB1OrvBqEvLfgSGUf2kvZsACaHOlIme6A2Ay7emQ1RloMat9irQZUR xPp8vu01wPIxx5MSEa+JNHTdqbIaBw8JxAX64= 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=lAvaXv7mOJzto88MZOIvjf/63HhAZgaKPx38ahvonMo=; b=f6gQHFezNt3y3hm9LPMKyFRn/JH4tt8XZ/aV+a034ahIebnDQp5Ia3FH4jHHyptGIx A68ehSO0hW4fkVD5Si+oRZGmXIaU0hhiCULKOFPCHXcDc9nw3bqZOUfSwnqXfjouELF8 JIw9JHuM7Wwe0hBV801yHNkKBvj9T7VKFmYAfLORiAr//12nr37k7K/JNVf05WDssV+5 /2daB2FHIhnsRpKy6k0XXt5iKOuGIgbPb6UC84FtxpiU/e62KmzgaFmbZMw3Aqvmv5bQ zWeFydiwvOlZ7IgnArm3Tuqdumw8nHqAjWbWEOLEf8goMkHykm91YIBKQ8GxIdayzY77 U4/g== X-Gm-Message-State: AODbwcA2DRD+4mYwijX6jYD32Vjn6CwzargvySMeCxmvCYklViohy6MG PKi6pFFlmIzFPBOcg8rUzj97 X-Received: by 10.28.0.13 with SMTP id 13mr10446219wma.19.1496072798437; Mon, 29 May 2017 08:46:38 -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.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 May 2017 08:46:38 -0700 (PDT) From: Benjamin Gaignard Cc: Benjamin Gaignard , Lee Jones , linux-kernel@vger.kernel.org Subject: [PATCH 10/15] mfd: motorola-cpcap: use devm_of_platform_populate() Date: Mon, 29 May 2017 17:45:58 +0200 Message-Id: <1496072763-31209-11-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 Usage of devm_of_platform_populate() simplify driver code by allowing to delete cpcap_remove(). Signed-off-by: Benjamin Gaignard CC: Lee Jones CC: linux-kernel@vger.kernel.org --- drivers/mfd/motorola-cpcap.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) -- 1.9.1 diff --git a/drivers/mfd/motorola-cpcap.c b/drivers/mfd/motorola-cpcap.c index 3cab58a..d2cc1ea 100644 --- a/drivers/mfd/motorola-cpcap.c +++ b/drivers/mfd/motorola-cpcap.c @@ -260,17 +260,7 @@ static int cpcap_probe(struct spi_device *spi) if (ret) return ret; - return of_platform_populate(spi->dev.of_node, NULL, NULL, - &cpcap->spi->dev); -} - -static int cpcap_remove(struct spi_device *pdev) -{ - struct cpcap_ddata *cpcap = spi_get_drvdata(pdev); - - of_platform_depopulate(&cpcap->spi->dev); - - return 0; + return devm_of_platform_populate(&cpcap->spi->dev); } static struct spi_driver cpcap_driver = { @@ -279,7 +269,6 @@ static int cpcap_remove(struct spi_device *pdev) .of_match_table = cpcap_of_match, }, .probe = cpcap_probe, - .remove = cpcap_remove, }; module_spi_driver(cpcap_driver);