Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2115872imu; Wed, 21 Nov 2018 06:58:01 -0800 (PST) X-Google-Smtp-Source: AFSGD/W3qiGIYSCuwJJQlwKIvjbKA+Tn6LyQlixgLQnXJxTxyhDtWtOYczbxljsZHY+ucGnkQGzN X-Received: by 2002:a63:c447:: with SMTP id m7mr6248691pgg.27.1542812281052; Wed, 21 Nov 2018 06:58:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542812281; cv=none; d=google.com; s=arc-20160816; b=BMCcoP6pVrW908hEq5gzL7xxXSnn+WHaZIbqJFPu7LElTldWbaPAGA5I97F9VQAC+1 L/qnVBcjU8yQHkbIgEcDbI2xZkCkhh6KfFslUECLwjU8QLEgQtMQmPh2l3BoboF4/hE1 onM1GII2GKDTzXg29SqxJjYpI+ghi8RDPYFC7w6nA4PKo7uMDadytKkdB2P3NbQ7fbSP pNgNx7+BuEs0iSuc0p8vSzefuZbq+FNt7Im7aAin4KAauaavHs1z7Q8TpyHzYKGWT649 NBE5oMuReF7Ah75Ex2pJcma5qSj7QJsBAC5bi3UZhcASuC4rGu5AqX8rKLC6ulTZswOR tVIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=LsJkGUqaixNZVE0nAmISN888bhxEVX8D0M13TuQ0X1c=; b=n4DFlpme4IMj/hd8ucmw5RR/92YpnLcf4//FGsSEPU9fUETMSfj7fQD/W2yGMv9jM7 RNHCHOS3Mx//n4lADkG5tdMUemzuXkynsyxG8dBFxfR3VJXAQCkOqX3tR/PLNTZo+FOX xHUWjBxsH00oBYUuwk0S9faFXRZ13LrENHa5/1nIaKVnDjdVL7uVe1RDxY0cOTcGETRW ASndNgGepiiYbYOjHJcX9C2yYJQ6yUBBI6SlTlZirShGl6KrjL3bfywJrIy303FJTTID vGn8Kqh5VldM/Cg8gl/SQCU8qqUxjyowxv9cPXB075HoaxxERV+SutTOOEDTfaKPGQit 6+1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RESx+qTb; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e12si1575651pls.71.2018.11.21.06.57.42; Wed, 21 Nov 2018 06:58:01 -0800 (PST) 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=pass header.i=@gmail.com header.s=20161025 header.b=RESx+qTb; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731316AbeKVB3j (ORCPT + 99 others); Wed, 21 Nov 2018 20:29:39 -0500 Received: from mail-ed1-f65.google.com ([209.85.208.65]:38824 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730863AbeKVB3i (ORCPT ); Wed, 21 Nov 2018 20:29:38 -0500 Received: by mail-ed1-f65.google.com with SMTP id h50so5113899ede.5 for ; Wed, 21 Nov 2018 06:54:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LsJkGUqaixNZVE0nAmISN888bhxEVX8D0M13TuQ0X1c=; b=RESx+qTbp7/T9Su3NMyyX3gFB6C+5ICaF2vE9ZhlIcHl605KA4m13Cn23e3By6TAsP kjcGrMVgfm6AfSMb5FH/Y/xH8M5E0QeM/6gOtQcmXFTBiAYe75e97VlPjGgTGb6YpZH/ PWMZQe8ikFSQV/4piFRHtaYOZvOwZBmiSfH7BYkcPSlGsC6MjtKHtfyFheLtuAniD/Tl 7ajgCMkuQnlTkI0XlLkQdqpfKE7UkX5HSSKvu0wzmQepOmVTFHJiHdolji+70CVoIp76 zQVKdjDrLhcJW5ZBdXpXHXo1txptfUKjiS7ovLHRxPLgbEepHm0tji5Niq+eWQ7a4Kmk TFLA== 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=LsJkGUqaixNZVE0nAmISN888bhxEVX8D0M13TuQ0X1c=; b=p7TDODYIQInCLDeu8qXYfC3olFYAZZvUOOcD1vjfQsYmvE5xX8tZC1gEWemE3CZO+u Oe1d/Co5kB/SlOPI4lF9ZM3DEr294wndUWZUhaRVYgzVsQPlcIxTyEIwvQhedMo5mLcU RQIEahd9YcYOnZrqAYIXWqW/LXYdzIaEJRjYYt29U11nK39TiLZ6Hcqd7cAM08hNeuK5 7mCh6LKZu3FYqLMxSb9y6cO8Zy2MpAi3DVjgs2GiDYwBTBRbx+3Rj+aKNWLfFXkshmPg /FZgy3UbpVz1BRX24ETlxuJk/hQcSPzsrt9P7oBgh970hv7zytK5uQQGr9ko7oGaTIb4 nWDw== X-Gm-Message-State: AGRZ1gIAUC383POJBaiv09AAo7TjY8mj34WqTtmdIFc1FI1ajKI4H7p5 TbfpDwICUEM29B0KAemm9Q7I2RyU X-Received: by 2002:a17:906:90d9:: with SMTP id v25-v6mr5283945ejw.214.1542812091976; Wed, 21 Nov 2018 06:54:51 -0800 (PST) Received: from localhost (pD9E511F8.dip0.t-ipconnect.de. [217.229.17.248]) by smtp.gmail.com with ESMTPSA id a38sm4884648edd.44.2018.11.21.06.54.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Nov 2018 06:54:51 -0800 (PST) From: Thierry Reding To: Jassi Brar Cc: linux-kernel@vger.kernel.org Subject: [PATCH 14/19] mailbox: omap: Use device-managed registration API Date: Wed, 21 Nov 2018 15:54:24 +0100 Message-Id: <20181121145429.7582-15-thierry.reding@gmail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181121145429.7582-1-thierry.reding@gmail.com> References: <20181121145429.7582-1-thierry.reding@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thierry Reding Get rid of some boilerplate driver removal code by using the newly added device-managed registration API. Signed-off-by: Thierry Reding --- drivers/mailbox/omap-mailbox.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap-mailbox.c index db66e952a871..7e54ebb7defe 100644 --- a/drivers/mailbox/omap-mailbox.c +++ b/drivers/mailbox/omap-mailbox.c @@ -486,7 +486,7 @@ static int omap_mbox_register(struct omap_mbox_device *mdev) list_add(&mdev->elem, &omap_mbox_devices); mutex_unlock(&omap_mbox_devices_lock); - ret = mbox_controller_register(&mdev->controller); + ret = devm_mbox_controller_register(&mdev->controller); err_out: if (ret) { @@ -508,8 +508,6 @@ static int omap_mbox_unregister(struct omap_mbox_device *mdev) list_del(&mdev->elem); mutex_unlock(&omap_mbox_devices_lock); - mbox_controller_unregister(&mdev->controller); - mboxes = mdev->mboxes; for (i = 0; mboxes[i]; i++) device_unregister(mboxes[i]->dev); -- 2.19.1