From patchwork Wed Apr 29 20:58:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 11518457 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 674B981 for ; Wed, 29 Apr 2020 20:58:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 50A692137B for ; Wed, 29 Apr 2020 20:58:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588193924; bh=T4lULlfdis3pO59cxx1iFLivWv+x8cqFPKw6Yx0n+E0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=DHhVKELPAEEMq96+gqDfGOJpEGceMdEQ40ADiiIHrG3mhoQ+DMMlXx0OJqF5xkz+B kUMPfX0WyBvI+czA68OPVOwENdxjJ3iOE0jtiWkziWOsnAKo+AQp7hsGZO44FeuSNz Bj31aZIwlooYgf2VMGCC2MvRvPLcNpbXbdZip5eQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727117AbgD2U6o (ORCPT ); Wed, 29 Apr 2020 16:58:44 -0400 Received: from mail-oi1-f195.google.com ([209.85.167.195]:44195 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727070AbgD2U6n (ORCPT ); Wed, 29 Apr 2020 16:58:43 -0400 Received: by mail-oi1-f195.google.com with SMTP id a2so3117386oia.11; Wed, 29 Apr 2020 13:58:43 -0700 (PDT) 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:mime-version:content-transfer-encoding; bh=mCsNkb20GktgvT3EVSg7e0Ed7fNCWMt0hSKRdrZhvDs=; b=sMDRWWbDbki96lLdasxcFtsMdVea8AQZ6bdNo6DLYMSvfBhgJwR9Ne3CZPL1rZqwjH m5m5dx6jGHF/nrzAawvTBr7Lsk5eRk4gmvK/ge9UjGFvbDKnce+BFfelDOpJLaKsijti hT1nwm2w38U38tmWJpA1hqwVaEtdezMysyWaFQlGe7Z3ziIi3fn1d1bDd9OlUDDgJnIL KlkQMrQHjKEK4gid9YSL9KycehfKpztHzlknWF3Zg3B3ynXKMz3gQodbP4arYs162b2A ujsU8hcsWbhC7AxCtHZIYGu+vo+7Ua4uwkrIvnemA6obDZ1MSYxpeCmy6G34ROz3bBwI VIEA== X-Gm-Message-State: AGi0PubN2YC+6OMu6e1Am6ANblwirBvDz9MKfDAvWI/1C9pAmgL9VOwR GiRUkztM0H+HzbMZ05x89Q== X-Google-Smtp-Source: APiQypIMdJYtJ48k8tsFDlemNM2E4VC1cOVOCiiaXWDZFhkxrRyppPOhxj91cmywM1r4IIPVqeGw1w== X-Received: by 2002:aca:2807:: with SMTP id 7mr123603oix.15.1588193922725; Wed, 29 Apr 2020 13:58:42 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id z13sm653162oth.10.2020.04.29.13.58.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Apr 2020 13:58:42 -0700 (PDT) From: Rob Herring To: Linus Walleij , Liviu Dudau , Lorenzo Pieralisi , Sudeep Holla Cc: Kevin Brodsky , Arnd Bergmann , Catalin Marinas , Greg Kroah-Hartman , Lee Jones , Sebastian Reichel , Stephen Boyd , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH v2 10/16] mfd: vexpress-sysreg: Use devres API variants Date: Wed, 29 Apr 2020 15:58:19 -0500 Message-Id: <20200429205825.10604-11-robh@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200429205825.10604-1-robh@kernel.org> References: <20200429205825.10604-1-robh@kernel.org> MIME-Version: 1.0 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org 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 Cc: Sudeep Holla Cc: Lorenzo Pieralisi Cc: Linus Walleij Cc: Lee Jones Acked-by: Arnd Bergmann Acked-by: Liviu Dudau Signed-off-by: Rob Herring Reviewed-by: Sudeep Holla Acked-by: Lee Jones --- 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); }