Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1058701imu; Thu, 20 Dec 2018 09:25:00 -0800 (PST) X-Google-Smtp-Source: AFSGD/X629kqrh+nCIRv2hgV+Wy8QR+QAsTBESEq4kchn7zjnCBJqLc+3Pt/FXW4avpi5KfUfdkX X-Received: by 2002:a17:902:9a07:: with SMTP id v7mr24175654plp.247.1545326700077; Thu, 20 Dec 2018 09:25:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545326700; cv=none; d=google.com; s=arc-20160816; b=fyRp1XUB3uolyaJvEMM8zf6yeWiHHJh+/x5k9dvDwBb/EeaTCSaj29SDH6wgz7FPzL Oojz7HXySiqAxsUYN/XGZwVrKJNXOHaFyNvrIBojPNkSBKJnPWNFIA62dp9Xkf1XBJXv Xg/Avbt3HzHAJD7ja5+U/aNtNq5NaDZsIfuPKf/5fywokE/YbG10ssilpyeU4ovwUgOU O79XcGV0/N4KK8EzP5zMGq8SvQX3SS9VEx3f/5370Bw0VUOeD4ZC7itG+bnj8s2ME9bf DoKAsYLayWLseYktzqbn+419oh9S8HFvYfHU8JKYVjiRVoWMK0dcK4fXfBTwPNQc6ePe mXmQ== 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=DvIlnbOfmNRaaSFhv0dATMqXe/B3z0+hPYy8eaSe4VM=; b=vGsMFfFv/R3f3ptdcmlAynqV26nYZ6A7fQfPeaqfpkpJ87XcPCLUSc5u7B58VEGVsk agdBjPEpH+mVa9KOQi4e03yD7aXTwg1SgjmYrpvMDp8nkltmrTmt8788tfdoy9xrgZl6 csYRmJNy8CaYhSz3vKWE8Dh4WQXfERyjJENBAfY6qNks0XwaqMSKGqRPw9fWbhi12aUd bby9LHEXAfnjGGaBTwE/AOGrMChzJt1cpcNsaB6NkgGvDYQjIsTDe1UkesFHiSFZIXzs HaQhI2MMmjvNTplVcdA8hUVirGyCLuYI6sC/6Pgdn5sS7Z0IH36OfXqEj4pWixsesSJN cC7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Y4QxjNC7; 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 u11si18038427plq.287.2018.12.20.09.24.44; Thu, 20 Dec 2018 09:25:00 -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=Y4QxjNC7; 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 S2388060AbeLTRVz (ORCPT + 99 others); Thu, 20 Dec 2018 12:21:55 -0500 Received: from mail-ed1-f65.google.com ([209.85.208.65]:44728 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728221AbeLTRUJ (ORCPT ); Thu, 20 Dec 2018 12:20:09 -0500 Received: by mail-ed1-f65.google.com with SMTP id y56so2373935edd.11 for ; Thu, 20 Dec 2018 09:20:08 -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=DvIlnbOfmNRaaSFhv0dATMqXe/B3z0+hPYy8eaSe4VM=; b=Y4QxjNC7MBMenbN0zUeBmAnQ5BwNpJNxHewya03/qRY6LG/isdmc7sX0MR+JrHRYkI KPnBTgAjB4Pe05uNesESAH4oot7m0uUKDZdjcCjeJEUorHxqj6V7EHePGSSszHKXMYSk c7Xec2ZSRNvlbxH+yrV6BCYRjddp0zqlyvlrCb+Dl1rbtvF5jxUMSIjVVBHFYxrgMhUk XPJZAPRCOqbiCFCdOxgZgy42RmAEN4c0UpyfJe8xRKQD8OQcaIf7VDw6MiP5u1w/Q7DU doi8cPL9doL9hCJiQRTW7TA4ZMWmJwiioitPgSR2GoNyI6z6BNNCQKm9ta2fI6IHfVWs Vtig== 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=DvIlnbOfmNRaaSFhv0dATMqXe/B3z0+hPYy8eaSe4VM=; b=G7iHrevI+0Kt/xCtLmVElZFKAn4xTRe199mCWqpJw/BdyEgDbZuarPIdStvmc6kIbj MZCkLVwNwJr5LDLB0TLdW1/5WZJLJjEfyLRRyCvLhF8YrdCywijfd73A+P6eQnXWY6aJ HMYvOfGzyH13FBV90pcqkpMhDucPVPuiLSDvfuFN9EtnFYX5zIT95zW2eHSBcaQ5bwm1 vQ/TaIt/9bzx7PsOffUTKJ49+MXkcUYNuY+C8diXy9EspXfj/QZYfhKTLS0liBtTsn72 yR3zkwhKrqb3MNkvb91cpfReCoTIxnihTsawOHugn4g1wkffXQ3b0A7MF6a+oaxcE2uQ ATvA== X-Gm-Message-State: AA+aEWZje9bD2NKZy91eACCTCro4cE6PHunPxwtfcdyQ+ktycAnYh9Rn Yd0OV218kDlwAB02mVbaG2I= X-Received: by 2002:a17:906:3b11:: with SMTP id g17-v6mr20005564ejf.210.1545326407873; Thu, 20 Dec 2018 09:20:07 -0800 (PST) Received: from localhost (pD9E51040.dip0.t-ipconnect.de. [217.229.16.64]) by smtp.gmail.com with ESMTPSA id c30sm6272717edc.70.2018.12.20.09.20.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Dec 2018 09:20:07 -0800 (PST) From: Thierry Reding To: Jassi Brar Cc: linux-kernel@vger.kernel.org, Sudeep Holla Subject: [PATCH v3 02/19] mailbox: arm-mhu: Use device-managed registration API Date: Thu, 20 Dec 2018 18:19:45 +0100 Message-Id: <20181220172002.9016-3-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: Sudeep Holla Reviewed-by: Sudeep Holla 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