Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1058608imu; Thu, 20 Dec 2018 09:24:55 -0800 (PST) X-Google-Smtp-Source: AFSGD/V4a+wtFQGeNz1TTJHODN/BegsE9dyh9oKeXCCVFhSihqyej8PivPfFmdJgpCEJy6BqyhIB X-Received: by 2002:a17:902:6b46:: with SMTP id g6mr24946652plt.21.1545326695550; Thu, 20 Dec 2018 09:24:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545326695; cv=none; d=google.com; s=arc-20160816; b=Fmpx1T36JBcm31UDKbBAamV05olVEpRoVuF5zzR8cz3KNV/kTK6gIR0ShxJpeLetzN RjPu/ef3uWiVBusz0SRZ2WV65igc0VhnzPNU7qjJSigjDy7ORPuV5aVbF+6Hz1ZU0g07 m9wYNt0ovYxpcu/X+Bxng8ouJuk4eGNd3Z9bDlVyn61p25NLUmTGsOPovRrhICj6PICy MdhEDU3pi8QA/TZ9TZPb0ccxxMGDtVk0fXMICEoFbPYoYECz1W2xId816AedlQU4c/YD zxvFktGoyylc1pFnUVWV0ydj4b/5wG87E/OdLHghzjc8MuTpb/0DPybYXK5NtIxAAODc uU9g== 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=3rsKFW04x7SNb9/m8whEnCmz/CJYUBzTpBQOd4qbbfs=; b=kX9lCtwgK73A6KLhwt7Vka8fa8NXXrtG8811b2KSJ7RivA0iZxxgOvyqkviYGgfz1t zsJnALbhN5gopBpI434eVJyFOaOjz5Tc5qtXfPf1yDrUrOD0JyBSGm2a1MCOaLAdgsZO cvklmL7DcaUHFGIpbn4xK+u27iwYaI9JPDlxpIP39kNAxbPZtWAq/tP/yG0/Mp1vkJXT S5Uoo1fey3icrnaD2ZQqi2ft+0w5iEgHQF1/c++wf3LeR5YdOfYfVEE6ttgHA40NEAWE hAJEveH1w30jXRCOKLdnhS359C+J5dgNgfjFp2udG7PK7yVMqn8IqqnJQB1Kq0geSVey qLSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nnQuUSOj; 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 4si4849018pff.161.2018.12.20.09.24.40; Thu, 20 Dec 2018 09:24:55 -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=nnQuUSOj; 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 S2388022AbeLTRVT (ORCPT + 99 others); Thu, 20 Dec 2018 12:21:19 -0500 Received: from mail-ed1-f68.google.com ([209.85.208.68]:34157 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387876AbeLTRUZ (ORCPT ); Thu, 20 Dec 2018 12:20:25 -0500 Received: by mail-ed1-f68.google.com with SMTP id b3so2418440ede.1 for ; Thu, 20 Dec 2018 09:20:24 -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=3rsKFW04x7SNb9/m8whEnCmz/CJYUBzTpBQOd4qbbfs=; b=nnQuUSOjJL5b7GSCTpns96jnYGziQCUEVUcPdlNFPsddoann87IV3wjGrZYjHcWAzY mR1zPlFxb8qwLcdz+oRpPu2uwoqbwKLIg2iMlFXIrT2BvPVcQqQlawH4OCqI1fkIOqna kVat0W/xrJObAFbJ/YdSRlG68L5T0aqBpyawMITxCyM3cWdA90uK7uYnswphbLeY7Ex+ 5sYW/+TSlbGHWo8yiRBABPcWDVehAT/K8s6sJ2bMgtqYaCwBtErsLeh96BPl4xkTogvT HcDzjutkt1n1+k5MsPRoXmHzpbdeeEW4epOkEy4UIF/Y1jgVakUoGcXE9MbZKZ7kVt3Y EHJg== 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=3rsKFW04x7SNb9/m8whEnCmz/CJYUBzTpBQOd4qbbfs=; b=EOEG03XQ1HnFqLaq3+/UFNlWvGHcz03kmPCVbC/Q9W2B/rSGfP/uPvxfdD/6+NW2Ov jNQXe20lVrpysfCO/uj6uChsPpGybVdBtZ0iP0sklLKlLDKq6pbkYugc+NL602/ike7H vJmEFL9mBIKFfYjStZIUM5h9DyPULMaTF6pNTjdjYxrWXxu8hEh5+26HMAbE4+iHckyL c/xOW0jP4azQAk7TrNuwhP8Ef46TNsJoBtyN5Iu1p3a6DogpcXeYKgwC+PZYETzkAw6f sXAV0QCz9E2G2XnB+5oyh7LX5aM7Z8kpHYuTmEgZsLC0tO7aR++5H5xhI9cD6h78ws3N yi2A== X-Gm-Message-State: AA+aEWY7xUOyaY9KGfUJNMGBbW1jWX9qxG9wRKqPmn5QhWk9dRtlB3nA TYChoYz3wMlelSRczqn+I6U= X-Received: by 2002:a50:e610:: with SMTP id y16mr7986506edm.163.1545326423361; Thu, 20 Dec 2018 09:20:23 -0800 (PST) Received: from localhost (pD9E51040.dip0.t-ipconnect.de. [217.229.16.64]) by smtp.gmail.com with ESMTPSA id o37sm6207723edc.32.2018.12.20.09.20.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Dec 2018 09:20:22 -0800 (PST) From: Thierry Reding To: Jassi Brar Cc: linux-kernel@vger.kernel.org, Houlong Wei , HS Liao , CK Hu Subject: [PATCH v3 12/19] mailbox: mtk-cmdq: Use device-managed registration API Date: Thu, 20 Dec 2018 18:19:55 +0100 Message-Id: <20181220172002.9016-13-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: Houlong Wei Cc: HS Liao Cc: CK Hu Signed-off-by: Thierry Reding --- drivers/mailbox/mtk-cmdq-mailbox.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c index f7cc29c00302..d9c3ec3667a8 100644 --- a/drivers/mailbox/mtk-cmdq-mailbox.c +++ b/drivers/mailbox/mtk-cmdq-mailbox.c @@ -337,7 +337,6 @@ static int cmdq_remove(struct platform_device *pdev) { struct cmdq *cmdq = platform_get_drvdata(pdev); - mbox_controller_unregister(&cmdq->mbox); clk_unprepare(cmdq->clock); if (cmdq->mbox.chans) @@ -524,7 +523,7 @@ static int cmdq_probe(struct platform_device *pdev) cmdq->mbox.chans[i].con_priv = (void *)&cmdq->thread[i]; } - err = mbox_controller_register(&cmdq->mbox); + err = devm_mbox_controller_register(dev, &cmdq->mbox); if (err < 0) { dev_err(dev, "failed to register mailbox: %d\n", err); return err; -- 2.19.1