From patchwork Mon May 29 15:45:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 100676 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp395929qge; Mon, 29 May 2017 08:49:18 -0700 (PDT) X-Received: by 10.99.132.194 with SMTP id k185mr19711194pgd.43.1496072958053; Mon, 29 May 2017 08:49:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496072958; cv=none; d=google.com; s=arc-20160816; b=0egRiHaNl5oJweJlBi+9acH8+O5XesC91nOWvNiIDbLx0GanAb6qN0KiZ4+W8BWbFr KatWqt3LliHlCckIvf/kQBMIv5YqunKfMK/0ym5MzrKu5fNqsyZrnXbKKFrSl3U1lUll xqWLa/Ys9udLMJFsrU1RidCNi3tJkBCqMn78i06ZE9McecgMIySXAr+janZR6UcR+RCd MYJLo9mBltCD/lg/NkhVrRgrePdTue2Ta+ZV+4/6DR0J4CAkW3wkVKsoYEQ/ljxWAgJy zwQehS0R5nKpRXcGxSea1tBtCOPRCkgoSjN5WVfp/hMYueFHC/QIzGRnP0iXFtvNkuHD mkpA== 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=Pth/HfPsIQdhDvSrNnj3yp0zryImczUFWeU0DtUteTM=; b=BQLpVwaIKXazi0/QyOcv9NvMv0HJU3jLOYgZnJzYBoQLzZT6rO7wnGmSCw+5CepTW2 5gEoYy2SDgkr/l+cPbDnzBErAdUSZq3UmZuOKGWkze9SzJr+aqI1LS66Mt8QtEyPlj8D qPEp+hkjf4LwNcdoHDsk6Y/Pu6g8h3B5BhenoSFw5FEU7kb/AlQCQx9dLb8qZ+fUR9vQ UDYZVsLlwBRKPJ4v0zDGByISBPzW/G72Q/8d2Y57CoegiokJ7CavFfgvw4zRHj+IIvAN sW5NM/AvMuNYNBervKomvI8ZrISj4Zq/AuzmYfp4ZEdO5hwtBWIrz2XvvN4Te55l4dKl xJnA== 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 10si10396197pga.419.2017.05.29.08.49.17; Mon, 29 May 2017 08:49:18 -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 S1751352AbdE2PtB (ORCPT + 25 others); Mon, 29 May 2017 11:49:01 -0400 Received: from mail-wm0-f53.google.com ([74.125.82.53]:34076 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751163AbdE2Pqd (ORCPT ); Mon, 29 May 2017 11:46:33 -0400 Received: by mail-wm0-f53.google.com with SMTP id 123so20772733wmg.1 for ; Mon, 29 May 2017 08:46:32 -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=Pth/HfPsIQdhDvSrNnj3yp0zryImczUFWeU0DtUteTM=; b=GyCE6+vjyOBhbnQRcmp0bEGogAP3pxzNFdMq2CndOY19kFCxFrNg8f3KnsA8WkHudW hhUS+kEHEimIBVMm16xkb+fn576BBeKw5nn0DXBPYClgRW1K4gIPEEldjCcfj6RuTAAm +2fWBWUb5XL6IgY465ehl4SSvH2p6qtI3NZlQ= 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=Pth/HfPsIQdhDvSrNnj3yp0zryImczUFWeU0DtUteTM=; b=SU+KPlEipB4CiwhzwkOHzq18dvrF3fj+kXPRrCcsA3MGd/NN/TmioifNwh9QzW+U0T zmd7cwesl1zqySHKntK5nQx+krxwEW4NmL+t2CUUK1TKlooy3ymMmDqjT7hqCD6UBkoL idv2jN5U2xapX4mbp0RfBWcY6+BMRUrWrx7KrkG3y+aeZLwi7VauYeSdgr/daPIqaUrk rmng8+7XOALrpfCshr9QTTd7prLbhMAUt2vuqd/4FVJK4DyTflxJVUQkcd/aVUKAj+qb xIeuwBGCEnTiFO6kaZ/8HGrkBEeh9qo5HOFFyJpzjs6elJ6wuJhdxK8hE7OMeLPEf7UZ l/AQ== X-Gm-Message-State: AODbwcBGbXfzrAWmOrzpRdRX2DHcJKzM2QgX7Fv90OYeFvHehvR79UHF 11f68A/T8v/uJY0x X-Received: by 10.223.179.199 with SMTP id x7mr12357855wrd.72.1496072792000; Mon, 29 May 2017 08:46:32 -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.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 May 2017 08:46:31 -0700 (PDT) From: Benjamin Gaignard Cc: Benjamin Gaignard , Lee Jones , Alexandre Torgue , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 05/15] mfd: stm32-timers: use devm_of_platform_populate Date: Mon, 29 May 2017 17:45:53 +0200 Message-Id: <1496072763-31209-6-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() instead of of_platform_populate() and suppress stm32_timers_remove() which become useless. Signed-off-by: Benjamin Gaignard CC: Lee Jones CC: Alexandre Torgue CC: linux-arm-kernel@lists.infradead.org CC: linux-kernel@vger.kernel.org --- drivers/mfd/stm32-timers.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) -- 1.9.1 diff --git a/drivers/mfd/stm32-timers.c b/drivers/mfd/stm32-timers.c index 2182f00..a6675a4 100644 --- a/drivers/mfd/stm32-timers.c +++ b/drivers/mfd/stm32-timers.c @@ -58,14 +58,7 @@ static int stm32_timers_probe(struct platform_device *pdev) platform_set_drvdata(pdev, ddata); - return of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev); -} - -static int stm32_timers_remove(struct platform_device *pdev) -{ - of_platform_depopulate(&pdev->dev); - - return 0; + return devm_of_platform_populate(&pdev->dev); } static const struct of_device_id stm32_timers_of_match[] = { @@ -76,7 +69,6 @@ static int stm32_timers_remove(struct platform_device *pdev) static struct platform_driver stm32_timers_driver = { .probe = stm32_timers_probe, - .remove = stm32_timers_remove, .driver = { .name = "stm32-timers", .of_match_table = stm32_timers_of_match,