Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2116013imu; Wed, 21 Nov 2018 06:58:09 -0800 (PST) X-Google-Smtp-Source: AFSGD/XfiYG1NXWOvqZB6Fqjfe+mSsWR2xHvS3c+LOL41uw7irjjiu4oH3QBL3HNHGN1XJe8sfib X-Received: by 2002:a63:2141:: with SMTP id s1mr6323416pgm.148.1542812289482; Wed, 21 Nov 2018 06:58:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542812289; cv=none; d=google.com; s=arc-20160816; b=OsoJg1Kpzd/dpal/FpcQB7Hh+7/rvkc51UIDH1ENIMiEJfBBxz/BcDmn7ilAuZ0P89 NB5uqgxe1m1oVa77uL1eVaYnRtLfdEp+lKSGy3o3nT3Qk3NEe42lOhDH4Wq/Rb0vuOQR awJXAD76aNqaGRgbZvNyahrhWCoQzGR0SImf1ym20qG/ME79lpZgxH+fbKkB0kI2R2Mi 8T1N4kL/opm4mQMN1qN+ThZzJcq/ZGtHSZipm3L0ttcMwddaRCv/UE17q4lYPwu3/r/+ SJdkmvsho7t7bhgouiDYpfcw97g1mskSTx69FFZSdjK2oIuQHswZTgw2eoKQ4c1SRD6V 7x5Q== 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=BisYbebI+HEfjXm01nCBntqdaVnmuvPJqVkA1iHiGpI=; b=BW8b0u1G1CYfXonG7EgY9DnSEd3n5+ytSUhmogAw/XWtWdRSrFuZJaTv1A79cDgaMw feTtS7JFcdZWYwEyJJNBDDoh2a4ebSMvp8fdKHG0B+DoEkEiq8qf22l5WoOWXbrgfMI7 vmjs4hSXzUvLp+STOElt8rZ4nSNMzumK1Z6Yn004oEj+ZZZoe/PBuDT6bVRQAaajmNaJ 7ehs1DtcEFF9b2AALZ9D1RQoXR7pHw2JOQGgKd4Ojp0bsyTJtzuLJc6INCJ24OS/m56C mbClzG0W6jvjjSwEVWFD6f0IvvhZemZYlXEQRuaNC0Me94eM5Ks8pXfJY/gjsHnos5ce MqEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=duAu3lAd; 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 p188-v6si52899172pfp.119.2018.11.21.06.57.51; Wed, 21 Nov 2018 06:58:09 -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=duAu3lAd; 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 S1731421AbeKVBa7 (ORCPT + 99 others); Wed, 21 Nov 2018 20:30:59 -0500 Received: from mail-ed1-f65.google.com ([209.85.208.65]:35267 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728298AbeKVB3Y (ORCPT ); Wed, 21 Nov 2018 20:29:24 -0500 Received: by mail-ed1-f65.google.com with SMTP id x30so5133992edx.2 for ; Wed, 21 Nov 2018 06:54:39 -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=BisYbebI+HEfjXm01nCBntqdaVnmuvPJqVkA1iHiGpI=; b=duAu3lAd45cqHBEeNdtHgGrDCVJXiuy7XRKOZ9kLCFkFua3j9yU+s1wVqU6v8WxRK4 wTLS/z3veHcBwcRoB849TOp9su9iKvxyao6/VLYpJ7Lb3FKCL/0gHZgFoNVFjKxO1hLQ UYNJN0K7paCz67sVshYdw2ZTD95aMhDqCJ0G7tEg75GoAl0J3A2av3hNgXotOISLHA5J Hy7jYmqxXWaX7mAH3CCjIu00u/PYLWQ5Cz1LdB2zCkkmUBGoVthArk/FYtn/kfB6dPas zGSxYFupjF1Nbx5CO+OTrBtkEsQBY5EWEmDZG3vQ0GEZBAKSBOBNBIzrxNEpUHapIGTc 8UHw== 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=BisYbebI+HEfjXm01nCBntqdaVnmuvPJqVkA1iHiGpI=; b=qoA9zeadfKvAVzkPwz8kkX2hRwolPeT22iZA611mfC240lz+rslRGPBmUKFPQ4dToa 8Huyh/d3BGaeeJucvo/PS+E1MkUo2TvgCKk965GcmqIXbNeNblwCwRrsdqEf5WcQ6CaC WMMyFc1BgKa8OSB6V5c0/V/EnfX+dbqfKixDXpZ8OYL8OwkVva0y9OYeEQ9KnnGe3+fc /egogSZ3r1o5LKOPeqsVlDhVvpXkfdGwqHpH3zjBj+m7zM5XLo7Ye4gC1ru9iuaqLruf 3ddiLHUVXQEUoJ/GeW1lmd0IUeL5Pfo8B6uvTZ6A0yyKLvRe8xEH3HL9bn05j2aFmAiJ ghwg== X-Gm-Message-State: AA+aEWZ9FksGgMgx4mWOBzPYOG6vAQ/AaJMcx/sAgocvyT+nqb6srj1S IqLcgZKX0C+S81a1nB0cTzg= X-Received: by 2002:aa7:db0e:: with SMTP id t14mr2915706eds.292.1542812078609; Wed, 21 Nov 2018 06:54:38 -0800 (PST) Received: from localhost (pD9E511F8.dip0.t-ipconnect.de. [217.229.17.248]) by smtp.gmail.com with ESMTPSA id p22-v6sm7702036ejb.76.2018.11.21.06.54.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Nov 2018 06:54:37 -0800 (PST) From: Thierry Reding To: Jassi Brar Cc: linux-kernel@vger.kernel.org Subject: [PATCH 05/19] mailbox: bcm-pdc: Use device-managed registration API Date: Wed, 21 Nov 2018 15:54:15 +0100 Message-Id: <20181121145429.7582-6-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/bcm-pdc-mailbox.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mailbox/bcm-pdc-mailbox.c b/drivers/mailbox/bcm-pdc-mailbox.c index 4fe7be0bdd11..ccf3d62af7e7 100644 --- a/drivers/mailbox/bcm-pdc-mailbox.c +++ b/drivers/mailbox/bcm-pdc-mailbox.c @@ -1471,7 +1471,7 @@ static int pdc_mb_init(struct pdc_state *pdcs) mbc->chans[chan_index].con_priv = pdcs; /* Register mailbox controller */ - err = mbox_controller_register(mbc); + err = devm_mbox_controller_register(dev, mbc); if (err) { dev_crit(dev, "Failed to register PDC mailbox controller. Error %d.", @@ -1641,8 +1641,6 @@ static int pdc_remove(struct platform_device *pdev) pdc_hw_disable(pdcs); - mbox_controller_unregister(&pdcs->mbc); - dma_pool_destroy(pdcs->rx_buf_pool); dma_pool_destroy(pdcs->ring_pool); return 0; -- 2.19.1