Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2330353imu; Wed, 21 Nov 2018 09:57:09 -0800 (PST) X-Google-Smtp-Source: AJdET5cBf+/cT9CT4i4ZtwoS4NK6dUN82MsPGCbmoR9GXDBTVdz5CZe2BlXaMz82dWl7Hq0o/8GD X-Received: by 2002:a62:b2c3:: with SMTP id z64mr7770968pfl.120.1542823029004; Wed, 21 Nov 2018 09:57:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542823028; cv=none; d=google.com; s=arc-20160816; b=BSmxnlJJg3CGgan/JBI5ejHEsz02u5ljXruzm+OVuLgkOMBUK5wVRwOU1v+f5AF3W+ wy70AyqJJST/e3CPdYkKb8kHNnoi6g7TdJEu5lmtO92eoXL4mP1e9lSklN62iQdlDdgk 2na9A/rX8PQ1D9HWDcSUK1itguT/PtwQzjM6slQ6Ce/bNISkMJCK2G0FnrURWBIOPBGq 02qBCHb76cwNMBH/wIUbs6qYSfW/TGT4MjKe7T1zzOkCFRHs8Qu1hDVehqbC6xhphnYd HpNJGfMXBuYjX0kceYgeVIgWVD7gsy3XYP3S62xI+0ZxyAOvJQGVUN0obl7ckkjD/ShY 5z2Q== 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=gQK6/coun1pZ6hQS+rMGEGe9vKZQr1TxwE/Wpo/EJp8=; b=O6MLoUFUaSWNUqJFBy5Ad3XVAB7Iixx+EM2gR0ad/b+NJ6LajBQTmB0LPOVn83ztxw p579nH8WBSzGBLnCXFgt2epmBMEhJSbVfWAM5Xaoam1jZ6wziE8TcrhHfOEDyzC+JaXK AfpquhnSRkyXm2zy78S77dV8Cw/yPf+W1CZcXIEKZET+YQV+mw0W1rvZgTqMBksNz7sy 9mn5ABl3ObDzr2wCjS2PjRtbj7Y4m7dV1dlIYbZmfe2IFYgRgWBLyfqHUroXxHBi2nqL WksiqiU/J22wZPZPQWDHzrHRNU8z3+WERnLtuL2GUlVlPqdDTdaFzk0hB8bCWafbDzWv qKVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=h0TtLyB9; 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 d4si31591923pls.348.2018.11.21.09.56.51; Wed, 21 Nov 2018 09:57:08 -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=h0TtLyB9; 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 S1731329AbeKVB3l (ORCPT + 99 others); Wed, 21 Nov 2018 20:29:41 -0500 Received: from mail-ed1-f67.google.com ([209.85.208.67]:39340 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731307AbeKVB3k (ORCPT ); Wed, 21 Nov 2018 20:29:40 -0500 Received: by mail-ed1-f67.google.com with SMTP id b14so5114987edt.6 for ; Wed, 21 Nov 2018 06:54:54 -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=gQK6/coun1pZ6hQS+rMGEGe9vKZQr1TxwE/Wpo/EJp8=; b=h0TtLyB9LWk7WqKafWa5kLiOUkaQcE8ruH3xznI/f+qJMV6mBcPr2ONk4HjrerIbiW XnPOmwn/C5m3BVjJfoF6iSoSUSBAy2BR76OXSBXzsHpjjAbBY30nsCcHrtC3b+13mfXg YOvZMTD3M62aXE6BCS1y17zh9DdMURBXHcZh76oG/7G1oAZ7STkOFZzWX3kuG4wL12rE m3Ed79QIM1gehfdM0ZRU/vqnBEvLwoBIo5MKticGSRa5PjZU73TUAkUQV8JgmGQywNny iWiWC/MSCrmvJcDFULpKE+skW48UrZtv96tT0dHvs85DdbEVF3hIor01NC+zrXGY5ECB PpZA== 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=gQK6/coun1pZ6hQS+rMGEGe9vKZQr1TxwE/Wpo/EJp8=; b=K6Vk2e3vnOmeLavcDYC6gibRa9mEqlWkTFBeUCUC0ola0ujo5e7Jm+lCZvQsKaZUed ae6j0JBmJ2zhviTSjcTTHuzfBRt6dRCmRnbcpt6MGhrdQE5vnTMnuwoVMAFf+HUmtFqm wBaldKtPNpr/nvN3JmRHcpn/4LL3Uuwm9aPfqlDEY/za+1aeWmZBlpMVjnD/HvGfkwLy sMSY0o3zAU8TmibaOeqbni5hlNi6dFH2Jj/hA1n86bFRChyvXmfgwf1PBu8ZsBAbxL3U OqQdjzRPA/VbUpBHEfxc2KFX8us7EPn/bgUBreDQh7g+XlUSnHhlrTDp7jS4O0FSnSQl Apaw== X-Gm-Message-State: AA+aEWY6PfJYM8aOTv4QXbuGHM53lQfi4knNK87CWrJPNWwnh1XhNVW0 ny4XdcKv+Cx5/I+MmkGZ/B3ucGv7 X-Received: by 2002:a50:ad0b:: with SMTP id y11mr5794781edc.113.1542812093713; Wed, 21 Nov 2018 06:54:53 -0800 (PST) Received: from localhost (pD9E511F8.dip0.t-ipconnect.de. [217.229.17.248]) by smtp.gmail.com with ESMTPSA id m7-v6sm1652148ejx.65.2018.11.21.06.54.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Nov 2018 06:54:52 -0800 (PST) From: Thierry Reding To: Jassi Brar Cc: linux-kernel@vger.kernel.org Subject: [PATCH 15/19] mailbox: platform-mhu: Use device-managed registration API Date: Wed, 21 Nov 2018 15:54:25 +0100 Message-Id: <20181121145429.7582-16-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/platform_mhu.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/mailbox/platform_mhu.c b/drivers/mailbox/platform_mhu.c index e13201a5cec6..d2502c5be130 100644 --- a/drivers/mailbox/platform_mhu.c +++ b/drivers/mailbox/platform_mhu.c @@ -163,7 +163,7 @@ static int platform_mhu_probe(struct platform_device *pdev) platform_set_drvdata(pdev, mhu); - err = mbox_controller_register(&mhu->mbox); + err = devm_mbox_controller_register(dev, &mhu->mbox); if (err) { dev_err(dev, "Failed to register mailboxes %d\n", err); return err; @@ -173,15 +173,6 @@ static int platform_mhu_probe(struct platform_device *pdev) return 0; } -static int platform_mhu_remove(struct platform_device *pdev) -{ - struct platform_mhu *mhu = platform_get_drvdata(pdev); - - mbox_controller_unregister(&mhu->mbox); - - return 0; -} - static const struct of_device_id platform_mhu_dt_ids[] = { { .compatible = "amlogic,meson-gxbb-mhu", }, { /* sentinel */ }, @@ -190,7 +181,6 @@ MODULE_DEVICE_TABLE(of, platform_mhu_dt_ids); static struct platform_driver platform_mhu_driver = { .probe = platform_mhu_probe, - .remove = platform_mhu_remove, .driver = { .name = "platform-mhu", .of_match_table = platform_mhu_dt_ids, -- 2.19.1