Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1058706imu; Thu, 20 Dec 2018 09:25:00 -0800 (PST) X-Google-Smtp-Source: AFSGD/UcGU/NN/H1cy/u8vf8+EjVlp/6vUilPZGjSDTgZ63wyRjHo7AX7yBoBJchQr6WctB2paLO X-Received: by 2002:a17:902:541:: with SMTP id 59mr25439356plf.88.1545326700256; 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=ErMBekSQCL7bnpqQLJ8Xnv1G80/P3FFlfDds8n6H6Q6Jw8kIfOaH42/PEvyNzWE+xI 7mIlUA35WLFwiKHmQ+ZDzU98hcG0h9evEHlqJRT79KSPd8DZphncngW74b0+Ll9sMgDy LDgVrsBiWfDt217GDX76WGVfSxBX8vglgFRlD0lXhV7mNQ0GtYfihnA++Yl2sXJuyNHi m21hVZeqZp93uJry0hN1DIBrunWeAGElZe5QKaEV5342Ooc9x6fjHOrp/gUJz7MSeoJn fmGS8Wc9KBPPzR9nrloeWFYqQVsDq1Opc0yx12AMXz+u493noN7m3Qn+v6VHSpo3dy7g VluA== 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=H/kPgrFxRe9kUUhR6JvSGe7kcKeba4lxi/88gm/plt0=; b=icX56Udcgd/ZWBUH1OIn2WciCMk3dUP/d9yNeLUsp/aiq7jA2KX8r6jC0m+OHf1zS/ 1XxaqnKuHUDFIz10PgnWytQk2gkQPczyGiA5o5vUhP3DrXXeVkOTylaSkYxsup3Bl8Tm g4Fr0i4YZ8aWC8YzMtfcSEAUr+nn6XvjvNhVe35mGKbQe7hkRElpaCPtueZPvLOHwQj1 AIUoHYojgQ/OnRkI1koaRgrALwYRo+RJRmXvgR+8xbqYeqVm88sw9WNDwgpF/jRSR1zg nJUdQmIr3orVQG+PX1gLFygFiC5XlthJCVqTuQjkOgAoNbEq83U0DARdTQm2s9dH/mB+ ldLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="CJ1BR/AO"; 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 w5si16739331pll.64.2018.12.20.09.24.45; 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="CJ1BR/AO"; 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 S2388012AbeLTRVF (ORCPT + 99 others); Thu, 20 Dec 2018 12:21:05 -0500 Received: from mail-ed1-f65.google.com ([209.85.208.65]:40084 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387911AbeLTRUa (ORCPT ); Thu, 20 Dec 2018 12:20:30 -0500 Received: by mail-ed1-f65.google.com with SMTP id g22so2392647edr.7 for ; Thu, 20 Dec 2018 09:20:28 -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=H/kPgrFxRe9kUUhR6JvSGe7kcKeba4lxi/88gm/plt0=; b=CJ1BR/AO0ih1f+DP+DfQFXhHrbg92p0RLKThfHhu6dLQAMfBjW3Vyl0Z8fFiI7d5hs TNLtOan3SCv5wDNv1ieQlt+YZ5HhvMw3d4gS+RP2wyFgQGSIfvgSqW00fHisVTrjyGN0 aoq+lBAaJFjT+sfYfjSTMi1YLhelF7Kq0cNal1oZpHCyZDGtQrqKzPDKwLdm/rfdcH/F HA8vvrzKV988ZXIExyywhUt6WtnMY5WFP2Uj0TxmUft4pOuRoOX2/eGxRZl8sHmOwRg3 xkFVBOMAyq1lhbiFTMTKyMt0hfYlnfuE2Y4L2bG4zqmQ+7v1zbBCA/fi2Skxcp2r3LzI 5Ulg== 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=H/kPgrFxRe9kUUhR6JvSGe7kcKeba4lxi/88gm/plt0=; b=Dwm4ALLPFULzYo5Q4vVK/JLs1B86eKSJob4pjoeTti50z0bzLoGwoi9b3L+dIhpo2T /xVL0zvNf92vTJ4yiqqlhQ15BHxKSGAJiRIIMG6t7IYPEvC0FYeljhX8msqp39uNJCnY GqtnweOWQh1Bv4uWNUPoIzjkxMVeyGkcdKIDE9gRMRC7uZmxLOCBUkIDXeJ4xS/gpLv/ Otclkql3zH9YCYVeJ9/VU0mqAtI3gzrLz/L5vJ28wFOZ+/trJNWqP92NBV0GSHvqxLdg UhLvFH7QIjlZv+HCw4HcGI7teOWW+xINMq4sKSls7/aCwb/1JpWzER8dEd46lNZrpUB5 NcbQ== X-Gm-Message-State: AA+aEWY9pkzBjVGY41E1M6uByrrFS0FIAvmJk6t1VyRQi4Th/VtT/ykg paCs3DJYmDX5IRSS44luUsg= X-Received: by 2002:a50:924e:: with SMTP id j14mr24702381eda.142.1545326427886; Thu, 20 Dec 2018 09:20:27 -0800 (PST) Received: from localhost (pD9E51040.dip0.t-ipconnect.de. [217.229.16.64]) by smtp.gmail.com with ESMTPSA id e53sm6296661ede.90.2018.12.20.09.20.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Dec 2018 09:20:27 -0800 (PST) From: Thierry Reding To: Jassi Brar Cc: linux-kernel@vger.kernel.org, Neil Armstrong Subject: [PATCH v3 15/19] mailbox: platform-mhu: Use device-managed registration API Date: Thu, 20 Dec 2018 18:19:58 +0100 Message-Id: <20181220172002.9016-16-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: Neil Armstrong Acked-by: Neil Armstrong Signed-off-by: Thierry Reding --- drivers/mailbox/platform_mhu.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/mailbox/platform_mhu.c b/drivers/mailbox/platform_mhu.c index e13201a5cec6..d2502c5be130 100644 --- a/drivers/mailbox/platform_mhu.c +++ b/drivers/mailbox/platform_mhu.c @@ -163,7 +163,7 @@ static int platform_mhu_probe(struct platform_device *pdev) platform_set_drvdata(pdev, 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; @@ -173,15 +173,6 @@ static int platform_mhu_probe(struct platform_device *pdev) return 0; } -static int platform_mhu_remove(struct platform_device *pdev) -{ - struct platform_mhu *mhu = platform_get_drvdata(pdev); - - mbox_controller_unregister(&mhu->mbox); - - return 0; -} - static const struct of_device_id platform_mhu_dt_ids[] = { { .compatible = "amlogic,meson-gxbb-mhu", }, { /* sentinel */ }, @@ -190,7 +181,6 @@ MODULE_DEVICE_TABLE(of, platform_mhu_dt_ids); static struct platform_driver platform_mhu_driver = { .probe = platform_mhu_probe, - .remove = platform_mhu_remove, .driver = { .name = "platform-mhu", .of_match_table = platform_mhu_dt_ids, -- 2.19.1