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: 9753439 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A8A246038E for ; Mon, 29 May 2017 15:50:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B94C23B24 for ; Mon, 29 May 2017 15:50:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8E74427FB6; Mon, 29 May 2017 15:50:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E4CD523B24 for ; Mon, 29 May 2017 15:50:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=8hMrgrOehuJ6JEGTNqO0KGCVbsJ2oqpHroHEg93uXok=; b=QrAsSr/HyKc4EOK7Stu7GofY+o btaHeoG5uq+QfGRAj03WwQLhM5CiGYN2BJin/RQvzBYrMiaN1zSzzZZ/fr/KjhIkNP8Odwx6zdrYW 5i5u5kbgLIJFTYtjNvj4wSWRT9EzPloTHENCGDvAtpTIb2qGudkRNgSaiqkAUi4qYrW885SZvkC/W V4fIWxdpXV5rhKaqytfquAz8JiVZq3oe8vt+9TbNYR49OaQuuAX3jd541kaODLKzclak7nRN+slFK Tx+j89BhXGBaKVWOxeGrvz9f5dPXfQnWZodvqz6++7f14Cazmmu4ocg/EFTxrj6SZKyl9hasYrFRS qm1A7TYw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dFMwR-0003EJ-B6; Mon, 29 May 2017 15:50:47 +0000 Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dFMsf-0008Ty-Qf for linux-arm-kernel@lists.infradead.org; Mon, 29 May 2017 15:46:58 +0000 Received: by mail-wm0-x22d.google.com with SMTP id m7so20788284wmg.0 for ; Mon, 29 May 2017 08:46:33 -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=tbxDCn6KxTT7o3zTMyLvzvYV6QO8NBuR0vjGTQopeAQ2OXnx//lFgjmvX+83wtrft6 ZsJDwNJ6ctXpy+8qOLXzm3VmYUp2wc4WWZ6HrxfmJOSMnRuX1tmhMXfOkV1RKoDZ2COb G/UFd3LLzL7suRYc/jFPh17+bTPTSSmZy4Tk0ccM0pC2WBgBVJOsZwG5D2k/vcAqqi3f AbFLZJuc91rUKTRbIS4sHd37t1xOq/YkbL1XDrO37nUdhaqQRRi5OQappOfHH2EMxSwG LzQmMO+yNBn8m6lR7BAIUPQkY10K7mwAKf8fb6LjbUrSKrHQUqVil+juo+6PaptF5AFU Huag== X-Gm-Message-State: AODbwcAX2enSG3d1o/vw9gOVWaHJk6zSMB91ipDtejJXNA6Bi7AZpe2L ITmTRrMDal9+JQRM 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 To: 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170529_084654_461330_4426B932 X-CRM114-Status: GOOD ( 11.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, Lee Jones , Alexandre Torgue , Benjamin Gaignard , linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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,