Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2116033imu; Wed, 21 Nov 2018 06:58:10 -0800 (PST) X-Google-Smtp-Source: AFSGD/XeMPIW+hg3gQCGfjI2nh2mC5Wh0oarSgtMC1dns9UFK0LrNZURYQnRVj11vD8rANAXQRPd X-Received: by 2002:a17:902:15c5:: with SMTP id a5-v6mr7043322plh.136.1542812290820; 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=lc8vGkMDg6LJP7Yw06qKslAc02ln+c+UQ2mEPsx6sE9qt8Wct5Z7530jCY8K2Sej8o AMZqGcze4htB8335zUpRre9CEa8ieH8o2tzGfBSPUsvt29POapdhTI7xOM93WqL0lBxO GmeV8x5eXUNIYw3YZjjmgHNS/qGCGwAeeiBHjw0xjJUj3G6GrCbhxPBQ4Q4uDLHW92ht DIy1RvnZl6WJghPZtR+ib1FYyMgm7sDcTudXbICKFM+Y/Vkj1OXKGrkJwlRYY5PXOuo0 Y4yAd31bNzojU940xa9UdtjIbhSED4zzzkGjDRhVxAQMBbQqeqTkCdnGmQnc3KJZZOmk iNOA== 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=G+g0p5nWEzeTlzn8krfddSnGEmrnpqUmVQ9WbyXeR9w=; b=o/Acyt1ejx+YafH1YgFzhiMcJWj1GT9uayc5h1AyZhJ7QnaYLUpSu9jgVP84HjQ708 c7xp1YvgBzmKR0QgGaG8u7xRw/s5WazJjwabKF9M6tMqFuKgbPGIwuvjcD501PXIuOU9 PydfUJOmbIOiOPRnDV3+Z9+TuuTWTL1UXnHlcOjgSy1o0V7aqO2IzkOq1Fs6WHsqMyWB 8XhqHaN2DeB+v796wnC9rdYALzc2gGLLFo/KFXnRJtnNcrO8+jQbQck+phhUvCdzhaxF csv9NiwluwzdEsXnBOUmXUqv2/mfp5l4gKiIrie9foCuHFs6uF3gs6GHJCYn0YiUkQH4 JYRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rOAV3Q4o; 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 cd16si19868008plb.47.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=rOAV3Q4o; 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 S1731168AbeKVB3V (ORCPT + 99 others); Wed, 21 Nov 2018 20:29:21 -0500 Received: from mail-ed1-f67.google.com ([209.85.208.67]:39301 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731144AbeKVB3U (ORCPT ); Wed, 21 Nov 2018 20:29:20 -0500 Received: by mail-ed1-f67.google.com with SMTP id b14so5114091edt.6 for ; Wed, 21 Nov 2018 06:54:35 -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=G+g0p5nWEzeTlzn8krfddSnGEmrnpqUmVQ9WbyXeR9w=; b=rOAV3Q4oY7tbFC5SdTNFJXu0m+kpJYIEocVIDlBPtej0VkhPY7t4TuVD9QMXxz8Rkj 8IGComT37rs+9r1JgSj6W+fyEK3ja40nlzeixsYMTEriUucVKRQbZ8wQTO6veZYMAWTE UMGHNuxglk6nCzdNO9FF/jjbAWs9iOY3JrNuGpaPHhzlu/jAMy56zqDbmUE8MdjBysPQ R+vgY40EvvzCSn0IE1d73Xjj3WSzaWc0/61BL7Eb3SaPY/I9Mvb6ScZ/7GeB0kwWH1EA ZGQjhMibGsJPFqrjwA681CSZJq3HyGpCyJ7qgjRqjrd5OqSotGDu7kAPaM9GxjrGOhZv nAXQ== 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=G+g0p5nWEzeTlzn8krfddSnGEmrnpqUmVQ9WbyXeR9w=; b=Igk/ByIvnc9PEF2eJ9lrcJq2yDjZnrMcQAk2p/SUyqWZyRo5OWU9My9BbfxxB52eBp /oippbVr6SZBZAA4u380RxWZscB9UCtkfrf3llwM7lITTd89IDADyjkTA02WKZXC6rJq vKPfa5gx5whXQGTjI117M0nBZweHO1FpWFEEwRpzTJIoNzVE12WYhff86iNaaG8wB4Gw cTcEXrwjdhk4GVWaKBNa1+rjgSqYNTRBH7JJT35ONsfLSi6KB75eY+nzQAdSa1cA8I0c THIyhs58QHJEVcCnNhoihRnHSX63PhfcouOkk/BxLpWgQEH3l//5cApxYPARcmZ8O6mz 0feA== X-Gm-Message-State: AGRZ1gLynMEOMR96Np1JO6OXqv2jbQ7ZztabXdmB1rDxX8sm8lI89HBx abRZPI1hf5awNH931nmYbS4= X-Received: by 2002:a17:906:d144:: with SMTP id br4-v6mr5143870ejb.18.1542812074060; Wed, 21 Nov 2018 06:54:34 -0800 (PST) Received: from localhost (pD9E511F8.dip0.t-ipconnect.de. [217.229.17.248]) by smtp.gmail.com with ESMTPSA id e35sm7652741eda.13.2018.11.21.06.54.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Nov 2018 06:54:33 -0800 (PST) From: Thierry Reding To: Jassi Brar Cc: linux-kernel@vger.kernel.org Subject: [PATCH 02/19] mailbox: arm-mhu: Use device-managed registration API Date: Wed, 21 Nov 2018 15:54:12 +0100 Message-Id: <20181121145429.7582-3-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/arm_mhu.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/mailbox/arm_mhu.c b/drivers/mailbox/arm_mhu.c index 99befa76e37c..64d85c6a2bdf 100644 --- a/drivers/mailbox/arm_mhu.c +++ b/drivers/mailbox/arm_mhu.c @@ -152,7 +152,7 @@ static int mhu_probe(struct amba_device *adev, const struct amba_id *id) amba_set_drvdata(adev, mhu); - err = mbox_controller_register(&mhu->mbox); + err = devm_mbox_controller_register(dev, &mhu->mbox); if (err) { dev_err(dev, "Failed to register mailboxes %d\n", err); return err; @@ -162,15 +162,6 @@ static int mhu_probe(struct amba_device *adev, const struct amba_id *id) return 0; } -static int mhu_remove(struct amba_device *adev) -{ - struct arm_mhu *mhu = amba_get_drvdata(adev); - - mbox_controller_unregister(&mhu->mbox); - - return 0; -} - static struct amba_id mhu_ids[] = { { .id = 0x1bb098, @@ -186,7 +177,6 @@ static struct amba_driver arm_mhu_driver = { }, .id_table = mhu_ids, .probe = mhu_probe, - .remove = mhu_remove, }; module_amba_driver(arm_mhu_driver); -- 2.19.1