Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2114698imu; Wed, 21 Nov 2018 06:56:55 -0800 (PST) X-Google-Smtp-Source: AFSGD/XH+IXJIzTdIv0gkgUCJZrMCv6W9/Bn5Sr9aLz48a41hJ2pA7677JqRe9bWXQ/AjAQB0LQa X-Received: by 2002:a63:eb52:: with SMTP id b18mr6120157pgk.213.1542812214957; Wed, 21 Nov 2018 06:56:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542812214; cv=none; d=google.com; s=arc-20160816; b=zpx3Sb5bigCV1Q8xQ9JmO8mG2UtwvlgjzDlJmPFWzkM/AuNldZ34UeGxwwLL4TqwU/ KhAqA8onw0MdWFeCjLfoaKF19QCx7sQYyqVNofac+l61yxmSF/wzRLC30HBzahzvxCv7 gTaLjcGEso2LOHe4LTS4lcmFpIXsnuWHBiQUxr1mMuFH/0ucnWJAoOJ5bMDkbhJpAcmq hRKvEjOIrpOn/tKjY4WGR7jethEAJxca1fz8nALg8gVi9LyYJiJN7O6Pu1fDcRUr0A71 GrEL8TIQ/gkbD3K6lHLDOntLp6TBqlcJlhM6/N3+bcwJSbJJuSnyUIUq/WOM3nKAen4C 166A== 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=nDKxi01t5e8VWtbwcHz6I82SRccgYuDoZRYkHOFG0TA=; b=KRZLB3dKlZO/6+I0grlkHzHlC/3fQbuLbrmTcJXcSn2lfxxxUl08yNKnXa+REhTYh/ lJtOFe7JkY3vNfbg/WgZNMqPn2wIizxh0iiKyYuKzoPOL/JiY6HV/jUO0ppbwa53M0nH 7BLDzLwBmCJN0P4Yf/kkKmMBhBvxIV4Dyb3VaYJN3SgSldgwQtda+ugmG9cSDkbpmKow Xt82h+5WesdmZYbolvzEWhSANhmicqe93qr7Bqc5ZmOWxmwl34sapq6XxEjxvVCPus3g 4otHuMa4nzfGlvF/RANntEqueni9RkE3PXYV5uRDZWD/tl8/aYMnx9cRst+dT7bECZUb L1IA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=I9y6SnmP; 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 q8si13970020pgc.580.2018.11.21.06.56.35; Wed, 21 Nov 2018 06:56:54 -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=I9y6SnmP; 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 S1731361AbeKVB3p (ORCPT + 99 others); Wed, 21 Nov 2018 20:29:45 -0500 Received: from mail-ed1-f68.google.com ([209.85.208.68]:42224 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731334AbeKVB3o (ORCPT ); Wed, 21 Nov 2018 20:29:44 -0500 Received: by mail-ed1-f68.google.com with SMTP id j6so5102256edp.9 for ; Wed, 21 Nov 2018 06:54:58 -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=nDKxi01t5e8VWtbwcHz6I82SRccgYuDoZRYkHOFG0TA=; b=I9y6SnmPp2gFaJHbxxSEFdWQNAJ2GBwk5sLhuGolYxRjryal7ixFHj2w7izUbEDiQ5 WCM8+wyHayk/ykbTaZd/iZaNrA3WgsxO0ehcV5MLkNhYVam1LcwMjgnxG2vZ6SsMcUcv LcXreSYRcsy3qhMUFlnqRoksst0r42oFuQem9Klr69eG9eZxErsnwl9qtInAUIq/Ru0r 8aHY1slz4lRXDUWWmPkDJy5hrfOjKgOF6iqGNC+3Gfiswrj/EYGkXrfNnn4jsdvDRpC8 rtl1U/zkFE17GkKa9FKZSKYXTFnuYmQwKgkOJqK40ytlWIkSEa0EOOfalKioKz0lJXql /Q0w== 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=nDKxi01t5e8VWtbwcHz6I82SRccgYuDoZRYkHOFG0TA=; b=hHUEqNo3p9I5bN2sW1w9CmIB48FJ+xMBkXXj6WUbNA0vPq1pU2pOlA4kdjcH3yioTO a9BU4tt1m1VelNatDqxqsFM3UeQ/UPbRwuz8IpvXjCg8vtLse6RvU5gPrjM1xZN+gEzW H8yd0aUDKWdJCe/bAjgc77NIbXx/LH0XR12Grba7GFj75ClwgGjNo2z9HZvt+F/DJEUg PXNs8xsGnbOfKIlADW7A93XqOxdTtzdRETpDy1B/qwipX56TAPuPDMyuj4z/5wgIGVPc qpsTEZs7laRc6hXFtTHDPTSnXIulr9CprZhII2liz/qXHiJ50kj2jD9Hm4wezZEuU8n0 Tj9w== X-Gm-Message-State: AA+aEWY+zXAjx8pMbuO+k+j9m8bBFzwPx/xVsA3ArgL2/g6fWMtstu+h AJxytJuO/p0aypSK8rBpT0Ntpuq8 X-Received: by 2002:a50:c19a:: with SMTP id m26-v6mr6207118edf.82.1542812098127; Wed, 21 Nov 2018 06:54:58 -0800 (PST) Received: from localhost (pD9E511F8.dip0.t-ipconnect.de. [217.229.17.248]) by smtp.gmail.com with ESMTPSA id c2sm13146625edv.14.2018.11.21.06.54.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Nov 2018 06:54:57 -0800 (PST) From: Thierry Reding To: Jassi Brar Cc: linux-kernel@vger.kernel.org Subject: [PATCH 18/19] mailbox: stm32-ipcc: Use device-managed registration API Date: Wed, 21 Nov 2018 15:54:28 +0100 Message-Id: <20181121145429.7582-19-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/stm32-ipcc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mailbox/stm32-ipcc.c b/drivers/mailbox/stm32-ipcc.c index 533b0da5235d..a338bd4cd7db 100644 --- a/drivers/mailbox/stm32-ipcc.c +++ b/drivers/mailbox/stm32-ipcc.c @@ -299,7 +299,7 @@ static int stm32_ipcc_probe(struct platform_device *pdev) for (i = 0; i < ipcc->controller.num_chans; i++) ipcc->controller.chans[i].con_priv = (void *)i; - ret = mbox_controller_register(&ipcc->controller); + ret = devm_mbox_controller_register(dev, &ipcc->controller); if (ret) goto err_irq_wkp; @@ -329,8 +329,6 @@ static int stm32_ipcc_remove(struct platform_device *pdev) { struct stm32_ipcc *ipcc = platform_get_drvdata(pdev); - mbox_controller_unregister(&ipcc->controller); - if (ipcc->wkp) dev_pm_clear_wake_irq(&pdev->dev); -- 2.19.1