Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1057693imu; Thu, 20 Dec 2018 09:24:07 -0800 (PST) X-Google-Smtp-Source: AFSGD/UDgtkvWXfz+toP4AbYDNKdeCnVZGqFSpXaHi7sH1+C3hzjrGghlqYWukIx5Y/9S6SQO9az X-Received: by 2002:a62:a1a:: with SMTP id s26mr25240369pfi.31.1545326646936; Thu, 20 Dec 2018 09:24:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545326646; cv=none; d=google.com; s=arc-20160816; b=AR/KQPnGLYzY5I99pUCcQOcAdc+RvKRcIgGmwDxBGE5j1NUNrprW+Sy9efiWggcpe0 qcX1FuQj3r1YOl0noyxKcnrdmgGGi9eMABhff5Pb2YC9I9+gesqUGsrhqUAX77u/0uUq qdDT9DNyv5NN6FiG0cbh6+SdVAjGIHvWxWfwshLE2aV0Et/ilbReaLovwihcEi09NGfh hfWbiUXuztneC92NvMT8VEAwxux8giE/MgvP/ypLU5k/RQLgrKTR700RMHQyfayMdFxf lKToAkNyT5uxMKEWENOm1strUmO4vUDhgwdZJPo6w7LXmEfbf31c0Ovn0rzvMjsa4qfQ Wm8g== 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=XUC4N4hBsBCybgHnPVn0KXU+VNJl5CqmJRaVpTSN40k=; b=scmTIqpd9gECx7Rxe/KP9CyBHHYfHuTHSGL1qEXmG5244CieySUgvRaC23rj/j4JCp 1lcTTnriAqH0vJPd4LRw+LgwUAuOtiaYPjSyqHk8Wbl/MXwiL2TguG51m2K3gC5fuLDX l/aeyn5/v/rA/4wmjM7PnmBqwMSYZLVMhMLR9La5VC9PA6Eyoi/K7jWe1aTF4xh4Z1rb bMBD3euYfUzTE/qYl6Ted56Xh5FSPdeoeNB9VfsUUFPDFqon+FzA735a6wJRCOutWSkU LLYN7y/HcEQ7YEUxnZoZ1yJWeei+c/Z9UKenR4V0JpfN8gMb6xQrwqJyCqg22H2od4ZF hbVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ut5PbKH0; 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 u5si15619374pgi.146.2018.12.20.09.23.51; Thu, 20 Dec 2018 09:24:06 -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=Ut5PbKH0; 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 S2387837AbeLTRUS (ORCPT + 99 others); Thu, 20 Dec 2018 12:20:18 -0500 Received: from mail-ed1-f67.google.com ([209.85.208.67]:40060 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387816AbeLTRUQ (ORCPT ); Thu, 20 Dec 2018 12:20:16 -0500 Received: by mail-ed1-f67.google.com with SMTP id g22so2392057edr.7 for ; Thu, 20 Dec 2018 09:20:14 -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=XUC4N4hBsBCybgHnPVn0KXU+VNJl5CqmJRaVpTSN40k=; b=Ut5PbKH0u+8AumZu7Gghcg5k+vqabA9FZhK9jC8ix71y2zzaIuqRCV7mHDWUaqhVmt VV+4mj0B5/SvW2uGUZTmJkV0+3aziJIuEVIax84/Lq/QEq1FvGO96HaEg/rfd+60rn/7 vWPGSNFkJcjGk+Ncn7pBCd1T7wlxoziKR/MU1Ymcz+qtLP7o8M2fz0n+gzySXcsgXbjd WS3D3xjUPNXMq9UlsyTsOx2RF3wOUzoMolgTs7nrJMJ0fWj45K4cNxPcBNd5ZqqYhZ3z ySiYKaNX8M0MyuY1IjOVDhL3icG5CZ0puoZYeeNoMuYMwFfN05yP7JsMSz9rzMAItuHk 8LmQ== 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=XUC4N4hBsBCybgHnPVn0KXU+VNJl5CqmJRaVpTSN40k=; b=jcwhLwVFYlNYy90VKQpFQEQt4SV83waPOV+gL+h/P69LCYhmMaQSO52dNgIKGwcubi kO/LawSj7mD1OrA6fOaoXxmyZHMoVBncsgIWReODZcYS6B/Q+RggUBQHVBMUAVG6p6Gf NS1rVrHsWuCcbruP63z9U3ueT7rpToKSwZM1AQEBnCPVVBm7ndd0OtjCp6oDHm/tQqKT CBBlTjlpzDeVEK2/jCDKD2u15fZuiilLhcEyOlhWX9iW0j02JfhPV6lN/ZOlnRlczfKb TEs8WVMUwZtpUHyNHtpi0Y01EGQBmHzp8tZl2M6UZLpC65kc/0VyicWdljRSGjQyWUWf SLSA== X-Gm-Message-State: AA+aEWY8ma1Wshdf/v58O3ZbH3TH+oB67YiWChY0FiCHDxYhy9hroWwW zQBLfpkFMMhzz8qllHitfIA= X-Received: by 2002:a17:906:8242:: with SMTP id f2-v6mr20266567ejx.125.1545326414204; Thu, 20 Dec 2018 09:20:14 -0800 (PST) Received: from localhost (pD9E51040.dip0.t-ipconnect.de. [217.229.16.64]) by smtp.gmail.com with ESMTPSA id w10sm6261555eda.77.2018.12.20.09.20.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Dec 2018 09:20:13 -0800 (PST) From: Thierry Reding To: Jassi Brar Cc: linux-kernel@vger.kernel.org, Kevin Wangtao , Kaihua Zhong , Leo Yan Subject: [PATCH v3 06/19] mailbox: hi3660: Use device-managed registration API Date: Thu, 20 Dec 2018 18:19:49 +0100 Message-Id: <20181220172002.9016-7-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: Kevin Wangtao Cc: Kaihua Zhong Cc: Leo Yan Tested-by: Leo Yan Signed-off-by: Thierry Reding --- drivers/mailbox/hi3660-mailbox.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/mailbox/hi3660-mailbox.c b/drivers/mailbox/hi3660-mailbox.c index f9aed5d8f9f1..53f4bc2488c5 100644 --- a/drivers/mailbox/hi3660-mailbox.c +++ b/drivers/mailbox/hi3660-mailbox.c @@ -265,7 +265,7 @@ static int hi3660_mbox_probe(struct platform_device *pdev) for (ch = 0; ch < MBOX_CHAN_MAX; ch++) chan[ch].con_priv = (void *)ch; - err = mbox_controller_register(&mbox->controller); + err = devm_mbox_controller_register(dev, &mbox->controller); if (err) { dev_err(dev, "Failed to register mailbox %d\n", err); return err; @@ -276,17 +276,8 @@ static int hi3660_mbox_probe(struct platform_device *pdev) return 0; } -static int hi3660_mbox_remove(struct platform_device *pdev) -{ - struct hi3660_mbox *mbox = platform_get_drvdata(pdev); - - mbox_controller_unregister(&mbox->controller); - return 0; -} - static struct platform_driver hi3660_mbox_driver = { .probe = hi3660_mbox_probe, - .remove = hi3660_mbox_remove, .driver = { .name = "hi3660-mbox", .of_match_table = hi3660_mbox_of_match, -- 2.19.1