From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76578C5518A for ; Wed, 22 Apr 2020 11:18:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 539A720781 for ; Wed, 22 Apr 2020 11:18:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726457AbgDVLS4 (ORCPT ); Wed, 22 Apr 2020 07:18:56 -0400 Received: from foss.arm.com ([217.140.110.172]:47854 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726104AbgDVLS4 (ORCPT ); Wed, 22 Apr 2020 07:18:56 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EBE3B31B; Wed, 22 Apr 2020 04:18:55 -0700 (PDT) Received: from e110455-lin.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CD23A3F6CF; Wed, 22 Apr 2020 04:18:55 -0700 (PDT) Received: by e110455-lin.cambridge.arm.com (Postfix, from userid 1000) id 99924682F3F; Wed, 22 Apr 2020 12:18:54 +0100 (BST) Date: Wed, 22 Apr 2020 12:18:54 +0100 From: Liviu Dudau To: Rob Herring Cc: Linus Walleij , Lorenzo Pieralisi , Sudeep Holla , Arnd Bergmann , Catalin Marinas , Greg Kroah-Hartman , Lee Jones , Sebastian Reichel , Stephen Boyd , Will Deacon , Kevin Brodsky , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-pm@vger.kernel.org Subject: Re: [PATCH 11/17] mfd: vexpress-sysreg: Use devres API variants Message-ID: <20200422111854.GW364558@e110455-lin.cambridge.arm.com> References: <20200419170810.5738-1-robh@kernel.org> <20200419170810.5738-12-robh@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200419170810.5738-12-robh@kernel.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On Sun, Apr 19, 2020 at 12:08:04PM -0500, Rob Herring wrote: > Use the managed devm_gpiochip_add_data() and devm_mfd_add_devices() > instead of their unmanaged counterparts. With this, no .remove() hook is > needed for driver unbind. > > Cc: Liviu Dudau Acked-by: Liviu Dudau > Cc: Sudeep Holla > Cc: Lorenzo Pieralisi > Cc: Linus Walleij > Cc: Lee Jones > Signed-off-by: Rob Herring > --- > drivers/mfd/vexpress-sysreg.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/mfd/vexpress-sysreg.c b/drivers/mfd/vexpress-sysreg.c > index 90a4eda2ba2b..9fb37fa689e0 100644 > --- a/drivers/mfd/vexpress-sysreg.c > +++ b/drivers/mfd/vexpress-sysreg.c > @@ -140,9 +140,9 @@ static int vexpress_sysreg_probe(struct platform_device *pdev) > bgpio_init(mmc_gpio_chip, &pdev->dev, 0x4, base + SYS_MCI, > NULL, NULL, NULL, NULL, 0); > mmc_gpio_chip->ngpio = 2; > - gpiochip_add_data(mmc_gpio_chip, NULL); > + devm_gpiochip_add_data(&pdev->dev, mmc_gpio_chip, NULL); > > - return mfd_add_devices(&pdev->dev, PLATFORM_DEVID_AUTO, > + return devm_mfd_add_devices(&pdev->dev, PLATFORM_DEVID_AUTO, > vexpress_sysreg_cells, > ARRAY_SIZE(vexpress_sysreg_cells), mem, 0, NULL); > } > -- > 2.20.1 > -- ==================== | I would like to | | fix the world, | | but they're not | | giving me the | \ source code! / --------------- ¯\_(ツ)_/¯