Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2116034imu; Wed, 21 Nov 2018 06:58:10 -0800 (PST) X-Google-Smtp-Source: AJdET5dWeQaQ1zWmWM7E6QtBZ8SooUP1os74zsbHxtvKHsron3DfRR4uFa1sm2SNcoASob7R6dpz X-Received: by 2002:a62:2e46:: with SMTP id u67mr7042016pfu.3.1542812290854; Wed, 21 Nov 2018 06:58:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542812290; cv=none; d=google.com; s=arc-20160816; b=NsFd9Vx3NCIZ3sSZFpZbO6MUmi5jROuJ49zpATPn5dko7SPcyb/EkRF20tt1gUIiVD y3LsbIb4OqbsLqv9aXKsLLb08vvVctazPhekQn9mpkCft+MLGXoFlDWwEQ9beDJPud0W ZRV8tn68TDxPJTvpBvCJLaBLoBYCjdlb4Rc/X+mRyCcEvHlD1Mb7PhFZKrKV/wWZjEFc djbwAepY4yPONhkydyJY/aJBOvuHhkVZpwIVCPSI5yzERUsKq+FjIcnLaY0d2VOVbE/o bYNMKu5m64Pj+a8zPBYgVIQp2PA13X+sS1z5OM0EMNZXv/xVBtwh6KjXZoCqN1SUB6HG 0+yA== 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=oPOfAAp695fHAn5TDSsb2YJrXbpcvTnkB9qGJG0Cl0U=; b=IEOux7dAZxsuwtsR766EIfvLCrnsi1M9+RCF4Os7E/x85rBACCuH8zLDSyaxtfzWIN fhZxtHSY7i2cEBcp2i22fn/pzEY5UeVdu0G9diu9ffndYiXm6dKKRxGPccCeOENbi62G w7F0xFPpjfmM+P46ihdvJGQElmSHEYz7tLtlkW19VS2I/QjM54BdTGwuQ5q0cNqcgj19 v9RJu2J6Rhe1LuAK8tcxhWPGgBCcU1PIEPj6nJxjhXD+SN+EwVRrWVQFzhHZIC1b3zB6 +yOzhF9fDBRqUSAlEfu2Zd8dV6cyRGcY3Y7T17BjwWale38Si3eyCt03MUEDBgMAnEKD 8QwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hgShIrMt; 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 f1-v6si39543387plf.288.2018.11.21.06.57.52; Wed, 21 Nov 2018 06:58:10 -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=hgShIrMt; 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 S1731181AbeKVB3W (ORCPT + 99 others); Wed, 21 Nov 2018 20:29:22 -0500 Received: from mail-ed1-f68.google.com ([209.85.208.68]:45236 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728298AbeKVB3V (ORCPT ); Wed, 21 Nov 2018 20:29:21 -0500 Received: by mail-ed1-f68.google.com with SMTP id d39so5084928edb.12 for ; Wed, 21 Nov 2018 06:54:36 -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=oPOfAAp695fHAn5TDSsb2YJrXbpcvTnkB9qGJG0Cl0U=; b=hgShIrMtO/2+X6BuxejlDtyLwdpmpcuJ9w9iX1D3b6euJjr+QQBHivpRywXqOV8AvS eePQunIY6AaJ7BRmraCeeM3UrX6hAKTKD6MhINT1FKzHcYPfEz3NNLUFB+m3IkJJpzRe 2R0j+pMQ2x8SgxmNZJKXRrC1vwRoY82PASIjDavEWkgq72BOYliMTXrfJBR9JR3SHE2P BKjUvYUcVXILxXPa9snIgBYW4QwSEjd1rwt/ZjHz8hRARgecC7nDWukUykle0/8lIx4l zgTLZjSDDhf8A02GeZPm7BkFs2KZ3GGBrMZDEB+BDrmP4VTtbuyKfuvwneiw6Nw6BX2F E0YA== 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=oPOfAAp695fHAn5TDSsb2YJrXbpcvTnkB9qGJG0Cl0U=; b=Wbw2UEIUw+KjcZ+Lx5O8cqkHdNom5/L2d8oTxh7r0ql4eQ4CmHpbsl/V8Qj671wNGw mfmGPyHXIU9/Cluk7bzcRcBCg4YpruhOJla2caEWMJLoyQW1QLOwppMbLZYuXMH1Og9I 4A2iT/ReqydC1sgH5a2q58c49hfwyp/6sB94O+rMaogQ8FDDU1wjM2v4yj7gfZd5H0vC hX9ywUcTTo2i2Tigd5Vw03x2Dm7jYG8r2mM59Lrt9OYFJbRzb+7rRQD5bwbGK/B56jlK G7KUgz3WAax9xqPfLZzgMhd6M5W7Svc8RF0Gb8sMff6+HjgT3RldHqqAIGSxQG79uaIC +MrA== X-Gm-Message-State: AA+aEWbTh9mgW20ZnLaCn637oE5TxVDAIj/VXBYxqcVzlyFPk/jSoMO6 xlz28cyDanjmjaMDjrquOlw= X-Received: by 2002:a05:6402:1347:: with SMTP id y7mr6042141edw.114.1542812075524; Wed, 21 Nov 2018 06:54:35 -0800 (PST) Received: from localhost (pD9E511F8.dip0.t-ipconnect.de. [217.229.17.248]) by smtp.gmail.com with ESMTPSA id a11sm9062713edc.28.2018.11.21.06.54.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Nov 2018 06:54:34 -0800 (PST) From: Thierry Reding To: Jassi Brar Cc: linux-kernel@vger.kernel.org Subject: [PATCH 03/19] mailbox: bcm2835: Use device-managed registration API Date: Wed, 21 Nov 2018 15:54:13 +0100 Message-Id: <20181121145429.7582-4-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/bcm2835-mailbox.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/mailbox/bcm2835-mailbox.c b/drivers/mailbox/bcm2835-mailbox.c index e92bbc533821..d48f67b25567 100644 --- a/drivers/mailbox/bcm2835-mailbox.c +++ b/drivers/mailbox/bcm2835-mailbox.c @@ -178,7 +178,7 @@ static int bcm2835_mbox_probe(struct platform_device *pdev) if (!mbox->controller.chans) return -ENOMEM; - ret = mbox_controller_register(&mbox->controller); + ret = devm_mbox_controller_register(dev, &mbox->controller); if (ret) return ret; @@ -188,13 +188,6 @@ static int bcm2835_mbox_probe(struct platform_device *pdev) return ret; } -static int bcm2835_mbox_remove(struct platform_device *pdev) -{ - struct bcm2835_mbox *mbox = platform_get_drvdata(pdev); - mbox_controller_unregister(&mbox->controller); - return 0; -} - static const struct of_device_id bcm2835_mbox_of_match[] = { { .compatible = "brcm,bcm2835-mbox", }, {}, @@ -207,7 +200,6 @@ static struct platform_driver bcm2835_mbox_driver = { .of_match_table = bcm2835_mbox_of_match, }, .probe = bcm2835_mbox_probe, - .remove = bcm2835_mbox_remove, }; module_platform_driver(bcm2835_mbox_driver); -- 2.19.1