Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2329985imu; Wed, 21 Nov 2018 09:56:48 -0800 (PST) X-Google-Smtp-Source: AJdET5dLTPbGzT4QHlXTs6BnTgxXnG0Ify8FmufiqXzu5zOuZYvfu6rf5+tLfPloscg7f7A0kYdP X-Received: by 2002:a62:32c4:: with SMTP id y187-v6mr7892237pfy.4.1542823008113; Wed, 21 Nov 2018 09:56:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542823008; cv=none; d=google.com; s=arc-20160816; b=WVB9d7TFeoi0maCNMj1ueGJwphSNP2/LVtxwdXB7e+vSNAzJUMldSSAhszBb9MtGve b8/ikjP17idbmHhPYnSeeFA+FgEdbqGQTJjUWdosYhzklZJ//ipLSh1VxEdnWbPL5Izu k+uHElbAMJctL1YthVTMg9sczcRAFRbbyXlfe1wSZPlOdeGsPAP1inGRvgYqLlpQiz7W Vat8XbVOqc6OA1poDXy9bJpuAAo/4BcoFnYdXjnGbklSKYIIaqVGH8jpcFm16PALySYE RhU53wCEhBJSQ4sdG//EvarjnaKvoJbznU8mKh1Lf7WliyLA5TqfxCDRmxZcAHLk3PKD rXPQ== 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=PzxUjnNAbhwN7r8Fc+mRz4FPenni3nOPBCv/QJaSIwE=; b=XqcNnWv2Ac8qyucqcb4jYloKT7DM70B9/khkL+/bpYbgXZpnObSHeXK3POc3iOFktk QKlcNSP3qD6Oq+/pDdVD4PL1P8/WtA0zYi6Gjc/AAE3lNlunyFt87DjU/+GGMs5RJbc7 fs6fmdD7BoO1DjfzzMkI3fMlv7r8tzoWNkRZ5fo3/MU2WI5Wr0SVzdYKtUG/IejO/HB0 oQh4vArEmqc5pBe/sPG0RA8XDy/lLtlmx7iSuXFNx+cyAeg/eBuN7kM7r2ymEY2sXxJq 0uHxZz+R/XBsJwvgP/mByUo/Z8Lc6tA0VORPth2kJnwUz91GKLAds4cnaE7kmZbak1wp 630Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eys4Xlh+; 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 w126-v6si49978515pfw.257.2018.11.21.09.56.31; Wed, 21 Nov 2018 09:56:48 -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=eys4Xlh+; 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 S1731287AbeKVB3g (ORCPT + 99 others); Wed, 21 Nov 2018 20:29:36 -0500 Received: from mail-ed1-f66.google.com ([209.85.208.66]:35284 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731263AbeKVB3f (ORCPT ); Wed, 21 Nov 2018 20:29:35 -0500 Received: by mail-ed1-f66.google.com with SMTP id x30so5134426edx.2 for ; Wed, 21 Nov 2018 06:54:49 -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=PzxUjnNAbhwN7r8Fc+mRz4FPenni3nOPBCv/QJaSIwE=; b=eys4Xlh+WPcRKF02gF5sKMa+zrz0wsGdAHMT5jPltLCuVkt+i9nYjkWcxyQcdWnZe7 LE3DA4pRW2/vjykQiYAd4AKN2UVEnOoU/Hposubure9ZZtwH9aOdv5w+TaHWnx2QyZoo VxwAYsiaRNkDAnomi5WXYg1mLwFHUtu3xVJQCDEEI1w93jgjDg42Ac4Ps+6CVN6A5+gL NSCH2RJo1vMyfZ3CRAbWkQ1fFlT3d8G8weLa2di915ZhKDjO1LqIldXtrPHqDppT7Bzn j/HM0EQPNYenPYM4o2YZ0YhlaEqSy5ACOzu/bJmr/sTRQ5RWT3bvoCwexbFbF9iNr2XQ 5E8Q== 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=PzxUjnNAbhwN7r8Fc+mRz4FPenni3nOPBCv/QJaSIwE=; b=S7nAxsff9FDheStuaXSCGCzaMY0/NodOS+ZdshDwe+cMlz26KqaWCB/bOXrzjBhmB+ XTH9f8knJEd3JZkAPHHl6Z6vLbB7BROl/JHzd3HL2ncxQsW3qJ2dauhr/yDPJFfyLONg ryY9dO3/rY9K3/gcoeuefYnKZHCShMZK4XgzblHD3YccD6Wa7cU4lVTuay/MlLPM0lYK f4elouu/VnhU2vsgnnosMdgwIyNshQ4qMMMY1UW+SMoIk5EHkCbYHA50gTfyc67qePa5 7lI8WlaFDrHMprYKTp/ln0k89Auy6ChZyNdGcowuK08+7+ilNDODtnwZ05jmbVJH9ATw etXg== X-Gm-Message-State: AGRZ1gJLKrhc/sA6b9luoIvnkNdHIaJ81lDZSR8QUmO+4Ei1pI1jEDb1 IJLuTAkhkbA+azzzZSW3/No= X-Received: by 2002:a17:906:f04:: with SMTP id z4-v6mr5366870eji.106.1542812088958; Wed, 21 Nov 2018 06:54:48 -0800 (PST) Received: from localhost (pD9E511F8.dip0.t-ipconnect.de. [217.229.17.248]) by smtp.gmail.com with ESMTPSA id d15-v6sm3293932ejc.31.2018.11.21.06.54.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Nov 2018 06:54:48 -0800 (PST) From: Thierry Reding To: Jassi Brar Cc: linux-kernel@vger.kernel.org Subject: [PATCH 12/19] mailbox: mtk-cmdq: Use device-managed registration API Date: Wed, 21 Nov 2018 15:54:22 +0100 Message-Id: <20181121145429.7582-13-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/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