Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1059092imu; Thu, 20 Dec 2018 09:25:22 -0800 (PST) X-Google-Smtp-Source: AFSGD/Uiefp3uFa7uj5Mk9O8oqskERlfV+gbg9jnalFkWcfuEdpj92HCGKO3aSSbkG6k/Sa+a0QQ X-Received: by 2002:a63:ff16:: with SMTP id k22mr11105966pgi.244.1545326722207; Thu, 20 Dec 2018 09:25:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545326722; cv=none; d=google.com; s=arc-20160816; b=H25WGxPLdYttz7/z4WTpejDf1NWZqfB6Y2hgVr1TacxzvHKyvi6rimBDkVjr4WD2I2 +DZfUUOlZrRoIcUd0uFC7R9YsCX+U6NbVinjG6KdsAKaI5ovwMw1MhYCLMQecZDBkQT+ fWmJUhfLjRBa9ek+AmKyj7Eah/k7cvPphQ6A1pGruFuX4cdOziO+15TkIf5DIl1X4tRZ jRp2/avYbaXbB/pcIsRwmJDqZNeGu5o2aYM2ajdmZuBEPSUCIbKOr0tNyRw9sB84Dy9y BmbB55YWduvQ9gFJjG1yaxRpSJO1wTeLCWExoQ8p2CVLtAYBVqcOxkC0LYAymZaeZb6H 0pZQ== 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=gR5GoNtNgIqnBlGdnudI3GvETIMd7aLXVYzcXr7mRVI=; b=FwkQLwIPavXyXIBD8TrvGPwEUANvX1ktLcOU3MvWk7dKHFs+B9EzFiR78xVIrQAvi7 zTZXKb4lBVW7KWQW7wBAsgxFfU7FG/nlpk+rDJb7h/HJRa0vrj069/rdWgRyo4wlhVJL V+mIqAVEeDwlu8N+XyT+vI//riXD+MZyOLfOTRq4/z7b46jAuJjMfgRaIDDvL6nFORz3 PlCxQN3pFnGLxNIgvqU3vwGABRh/uMi/+r09iA4+SkV8wB5MrXg2rv/93jxUHza/2/Xo 9PNDY4GCe4t6RBhev8mzvBeZMfvmXKEyn189tQ+9M7hDxAJ1Att9XnufCZsTsWxLU/zb DmYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Y70W0Xom; 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 p9si18827938pgc.448.2018.12.20.09.25.07; Thu, 20 Dec 2018 09:25:22 -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=Y70W0Xom; 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 S2387677AbeLTRVm (ORCPT + 99 others); Thu, 20 Dec 2018 12:21:42 -0500 Received: from mail-ed1-f68.google.com ([209.85.208.68]:39762 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387808AbeLTRUO (ORCPT ); Thu, 20 Dec 2018 12:20:14 -0500 Received: by mail-ed1-f68.google.com with SMTP id b14so2401190edt.6 for ; Thu, 20 Dec 2018 09:20:13 -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=gR5GoNtNgIqnBlGdnudI3GvETIMd7aLXVYzcXr7mRVI=; b=Y70W0XomGOuYT1pdSuDAGg6aqYWCWCIYkWgF/CbMgZTHuSrqy+gUzXbSQr/7U3w0Up 8GcNZmsISxrJnBUIZXOSPsklrUo9vvpNwJuHUtW5ml1BWAaMvYr8Mo78vZdx5p1Z7NTf 8xfCC1HH3WJqpZGBixnlgoqS3CH4imBITUHMsefk60HPWo66xlpIHm8jWTuA+OFrKN9F BimRrFMbiwG9DKVvyyPN5zXWnON/s5Jii/sT5JcDcw/QuIwvJF6HA+V/bYTXrON5NBHk RdvcsD+PbvIIkQWs4yxPCgrglKJMuY/php/AFHdvsLabvTfV0Ql0lZpC9bW2S/5ZgH/T SMYg== 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=gR5GoNtNgIqnBlGdnudI3GvETIMd7aLXVYzcXr7mRVI=; b=EIXA9HRxZ/hlSdCVdSKU+BDU0jrfBZ1NTadJEQhRvek6sDukLtyfcwegAx9C0NQ62i GwfeHR5tBuRNWXetthS/hkgwuwpGRyCdzdi7zXRzKv/3mkOmVHxvD35BP0RHo62KN5lp 8x4pPhhiOJ4doClF4S+3QmwwmqFryQKWmOjHoPMZP7wyNLGFIiNdzH9xgCFjtdEY60+q DYz2t3uXf6BCcPBJMhk76dAXA4tyJIFg1bKxDbJkDkhoTgOWgLKrab8YHRGzalRiPh2B o4MSNxTkyIR42WSjKVfA5rnJ/gnPcWrlssWSNORvxfshMs1w7egQJyQc7QztANDRvGwh ibLw== X-Gm-Message-State: AA+aEWbD9+bBqiX4qhDp+/8Qmp1ARGJoCK3h9CntyTFvIE6MgG33p66T hxxP9hQDwCJ0R0mc4XkZYc8= X-Received: by 2002:a50:b7d6:: with SMTP id i22mr23835601ede.27.1545326412654; Thu, 20 Dec 2018 09:20:12 -0800 (PST) Received: from localhost (pD9E51040.dip0.t-ipconnect.de. [217.229.16.64]) by smtp.gmail.com with ESMTPSA id h47sm6234760eda.8.2018.12.20.09.20.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Dec 2018 09:20:12 -0800 (PST) From: Thierry Reding To: Jassi Brar Cc: linux-kernel@vger.kernel.org, Florian Fainelli , Rob Rice , Andy Gospodarek Subject: [PATCH v3 05/19] mailbox: bcm-pdc: Use device-managed registration API Date: Thu, 20 Dec 2018 18:19:48 +0100 Message-Id: <20181220172002.9016-6-thierry.reding@gmail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181220172002.9016-1-thierry.reding@gmail.com> References: <20181220172002.9016-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. Cc: Florian Fainelli Cc: Rob Rice Cc: Andy Gospodarek 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