Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1056782imu; Thu, 20 Dec 2018 09:23:17 -0800 (PST) X-Google-Smtp-Source: AFSGD/UUCaNjroJeSK9m2cgWCp/6AwqIVyg4Vc7e7gDU8JHop3mgYqnemOyvJAH9tZkZz9HhG6BE X-Received: by 2002:a17:902:47aa:: with SMTP id r39mr24769515pld.219.1545326597835; Thu, 20 Dec 2018 09:23:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545326597; cv=none; d=google.com; s=arc-20160816; b=wq4FSv/FPlxZtJAFsJFQn2wr0mJp/PaLU8fVvk98XbE5GAU1V9uwPRfoLmtW4OVy5j eaBaIhBznAdoIpEKCNeQnSNBgitoE47IdS6bzaywVWhUa637effHY65OsGy1EZZ6lsqo hTR7ccJn+YQlKlCI94N9wyExe71rpB4PIR87I5gj4b4pw4x8PjeDkBLy9s7QbEnK0EEf DtjgLD8ZX2w0wE7ZHaUJmJwcOrZXBAJHqlW37dFua6+VCsEXP/sayr/rLSUpI29J3BTZ 43kvo3rRucFoyaXgG9atTEDZaCnkRxTza5aHP8kOV+sRycyIV0/uA3dlfWYHPyR4bavR QD4g== 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=Kb1ONw/VBWCjH6WMyY0wKwigCD+4iKfVXK3FwoyHWPM=; b=VKrcXVX161fZB15fWdxRqotPlQXQu1TS+eG7ZtzybasbH0BkhY23YU+FiiREwufBQY 4geFtzrl3pCIcBQBEO8nIrQSRlYUzJHJiAMYxJDtDhd5xy8NUd1oUK/mkZuIsQXA89US XocPmhuHV/xR7bxps/q99joTRVmfwg+oWCRun0AOrEIQhoPjb0RxW7eU82E4JldNoo2m c17TzuUIONRdeNhaAXPY9vZcBwALrKQ9ykt0lZM+G9ZzQo/6q/Rk0aBFr3UuZc17f4jf jXxIjfs7VmkNkAmqFeG/41nwPXRHPc8Ap2KEGSvfTgJUxlJIj4CPKbPQ5GV5rebWmZQw BM4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vO5RMFmV; 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 j5si19919116pfg.254.2018.12.20.09.23.02; Thu, 20 Dec 2018 09:23:17 -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=vO5RMFmV; 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 S2387966AbeLTRUm (ORCPT + 99 others); Thu, 20 Dec 2018 12:20:42 -0500 Received: from mail-ed1-f67.google.com ([209.85.208.67]:41725 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387945AbeLTRUg (ORCPT ); Thu, 20 Dec 2018 12:20:36 -0500 Received: by mail-ed1-f67.google.com with SMTP id g19so2394309edy.8 for ; Thu, 20 Dec 2018 09:20: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=Kb1ONw/VBWCjH6WMyY0wKwigCD+4iKfVXK3FwoyHWPM=; b=vO5RMFmVBxsl/ubbx+QR4JA1VWJ+aL55Hk/aOOotP1LlE2ryUA0ZYLr1CIXgBUltx3 vb4pFC35xC/kFVcUQAEsyG2pBa93rF0HXZF4B1fcmeVYsxKRjU/v56qPbwDusa3zaYIe EZkkhHaIpwZCBiuGeZlF+orgFJLnffMfNh3jsivP3VmK1NSykdCrvn4Wir7WtWXmYvF7 A2i+d7iVr9yGW1rReljfN0/Pxmh1JbMIUAhp6HwkzNsUGEPxcE6+LIOSVnCuhBwHh56A 6cVhsvvSFPEy9U60lB5+TSFNM2HcsoNiV1vzA+RtOmQBmCqiYjMim6by2Vu5Z/cKfJ+T 3v+A== 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=Kb1ONw/VBWCjH6WMyY0wKwigCD+4iKfVXK3FwoyHWPM=; b=keYbS/L/r4bbRWs0/3vjQDCy8keujniS6HtofxDQQaVqcdBLmxavZpicnPBF9KFukq FFGlkm/ZcvkFuKVOdpqwNmOu3qwEQ/Z54FCWv83Qa3kT9MLk0K4964T6Z/Iq/MlqAClw RQcilbbn1006ECScl/91jWeHl8mIGXvEKf9dck2McJCaxJ2/GWpCy/JxKtFfg6IfV565 AaWYbTgq06LYLjBHxBTO0GWPeTZb3sekXJf1grMaWz2GYb3HoNauGgkLZzgaW1ns4ZU0 tmLTZAU4pvD42mhljSoVhliyfxihwl1ySMjqJyCSk6JjzCOCdzUEYxjx0L+/DK39dIHz 827g== X-Gm-Message-State: AA+aEWav5zV0z/h0AC6eZa2OV8jYX6+ozroQXG6bSn/GDb0Je/QZlKst 8iXkvawrN0TLIfQ8PCrLUxo= X-Received: by 2002:a50:98a6:: with SMTP id j35mr24146219edb.141.1545326434477; Thu, 20 Dec 2018 09:20:34 -0800 (PST) Received: from localhost (pD9E51040.dip0.t-ipconnect.de. [217.229.16.64]) by smtp.gmail.com with ESMTPSA id y53sm6253086edd.84.2018.12.20.09.20.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Dec 2018 09:20:33 -0800 (PST) From: Thierry Reding To: Jassi Brar Cc: linux-kernel@vger.kernel.org, Nishanth Menon Subject: [PATCH v3 19/19] mailbox: ti-msgmgr: Use device-managed registration API Date: Thu, 20 Dec 2018 18:20:02 +0100 Message-Id: <20181220172002.9016-20-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: Nishanth Menon Signed-off-by: Thierry Reding --- drivers/mailbox/ti-msgmgr.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/mailbox/ti-msgmgr.c b/drivers/mailbox/ti-msgmgr.c index 6f6addd51d14..88047d835211 100644 --- a/drivers/mailbox/ti-msgmgr.c +++ b/drivers/mailbox/ti-msgmgr.c @@ -817,26 +817,15 @@ static int ti_msgmgr_probe(struct platform_device *pdev) mbox->of_xlate = ti_msgmgr_of_xlate; platform_set_drvdata(pdev, inst); - ret = mbox_controller_register(mbox); + ret = devm_mbox_controller_register(dev, mbox); if (ret) dev_err(dev, "Failed to register mbox_controller(%d)\n", ret); return ret; } -static int ti_msgmgr_remove(struct platform_device *pdev) -{ - struct ti_msgmgr_inst *inst; - - inst = platform_get_drvdata(pdev); - mbox_controller_unregister(&inst->mbox); - - return 0; -} - static struct platform_driver ti_msgmgr_driver = { .probe = ti_msgmgr_probe, - .remove = ti_msgmgr_remove, .driver = { .name = "ti-msgmgr", .of_match_table = of_match_ptr(ti_msgmgr_of_match), -- 2.19.1