Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1058130imu; Thu, 20 Dec 2018 09:24:29 -0800 (PST) X-Google-Smtp-Source: AFSGD/Vy4gB8tbsRXYIt9ocLMRgS6jxFrNvJNXpPUPiQ4XEc4S9XO6PWHKZz6DzJHFFcxrD/YdW3 X-Received: by 2002:aa7:8542:: with SMTP id y2mr10315753pfn.83.1545326669579; Thu, 20 Dec 2018 09:24:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545326669; cv=none; d=google.com; s=arc-20160816; b=OQ9p2NEQUZC5Pa3fRJeCzBZkzXeHSlyKKu6yNttfZKCfnUQj7YPRxBVpBgKMlCLXvs SJmekzyR+K70mRCWTKg5u1cNojkCmqu4LYfKwj6L+ut4frXim8fyxiiJSUfKuPBrcj/m aJskZHYkXGiheWL/RQxH37fLlVs4+4oL09k34/DTjOQZzBU+GVMzWz1cjA2F1ZfRnOpO +e27Niup7kL8y3OBxnq4veBpwcN4rOY4Rnp9XXyhN1aLV+i1jSkWfpRDLPwDU5AIN8Uz 2XKB16CH3F+7slSq40FMAljFpTG065QQWO/bU6ct3uotqw2DUbf/O3oggop5JhKgl9oF pHog== 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=CX/+P131Nmt+TB9PCjfflN8q5zM8HO223uXN1QzfE5w=; b=0ux8/rg3+RM27biX2/gGdRdJNhA9aQ04eAIVEQkVGnzXI66MPqiZzO8e/i6JM4Mj1Z FN8ulxD40+ZLeHMhjlQNtXowG4/4LqOlde8XAztsVBDfwqYtNRdkpxFN9mnfJvrHllf7 tEuHMo+w3FWpHWBvwNtRhIr5pPNxQYBQG24Xl8jacJqJzWGzGbb3dNa96Y9qBf6rWf3l t7/eBGBPoBhJpLjDoM2RMj34akC5hsF4wXZzx+vxi1SZRhLfvfgJo2gjyw2W8mPxxj3g EU5ujvWvZo7kt6eeYPM1pz5yoZkrMD0GSpgQLjwrvzS/kH9iyEhwsTVnrtiEJhNNuGVq xGWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=O7xy3Zex; 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 y6si19308416pfi.228.2018.12.20.09.24.14; Thu, 20 Dec 2018 09:24:29 -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=O7xy3Zex; 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 S2387951AbeLTRUg (ORCPT + 99 others); Thu, 20 Dec 2018 12:20:36 -0500 Received: from mail-ed1-f66.google.com ([209.85.208.66]:45593 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387939AbeLTRUe (ORCPT ); Thu, 20 Dec 2018 12:20:34 -0500 Received: by mail-ed1-f66.google.com with SMTP id d39so2372283edb.12 for ; Thu, 20 Dec 2018 09:20:33 -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=CX/+P131Nmt+TB9PCjfflN8q5zM8HO223uXN1QzfE5w=; b=O7xy3Zex8U+D2vfZ723w8OyPC/MtmSD2mXlqSGn3gQmEiVJ4VxNMkRz+GVanVNHmPa Bv6irttBSgAmmWQ8jbRfYpA4LBd9R89/EYL2QzKZhsYmr8QFWi9NDUrJwh7Z4Nsgg8np DkmwQ0X2vdCKgmPGDNOIhB8SxyAyCnkVLwFhyC370/+/stqkuniy58JmiX3nBu+kG4qM ja6e+5sF0E0mwHE2DUf0y1nni+5QSS6rZH0EeybLUQmMgjTdvIit1YcSzOLhog4xyXS7 CAqdzw3dhgGl9ii6qCAquzkJhzF6IEQu/BMFpLTdMl0sFZlfO60kJyue+w8jHvpLP9We lehQ== 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=CX/+P131Nmt+TB9PCjfflN8q5zM8HO223uXN1QzfE5w=; b=PTtDWu9XDCs2a/wlFev5dS2K/U841S/7UbLDi1zW8MGuZEV/inNtRe1AcF9pNtETgM hjsKgdqG8i+BwwHqm5oxJZSDqBd3iSe5/H+xMLQbBV8YiulBY6nbyq66jv6jmG+GGiXF jv4BYVf4d2WNnKGM8xlJuh/p4HMYAmbzMPbeeChfkXr43QQ3own/CsHXkmp5ek0qbmJa IMPekqMNXhGv06sMnUqCtz5MXHkt2lJcCDX6wGyebmNAVvG/tAcTmcWbICVb1TqHtVXR D/efLUbDjj3PuYF7aWAisX3dL/QhiHbKlybY9krW6Hg7wc4HDUwVAJveOH9zsmOcsiBq 60aA== X-Gm-Message-State: AA+aEWY/4s7m0IRWoqqrqahMya1LHHiK99IhjZXRTCZJhyriYsuBnlym m63rtTNujG7Rj1krquOT+to= X-Received: by 2002:a50:a5e2:: with SMTP id b31mr23825261edc.5.1545326432861; Thu, 20 Dec 2018 09:20:32 -0800 (PST) Received: from localhost (pD9E51040.dip0.t-ipconnect.de. [217.229.16.64]) by smtp.gmail.com with ESMTPSA id 97sm6354567edq.45.2018.12.20.09.20.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Dec 2018 09:20:32 -0800 (PST) From: Thierry Reding To: Jassi Brar Cc: linux-kernel@vger.kernel.org, Fabien Dessenne , Ludovic Barre Subject: [PATCH v3 18/19] mailbox: stm32-ipcc: Use device-managed registration API Date: Thu, 20 Dec 2018 18:20:01 +0100 Message-Id: <20181220172002.9016-19-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: Fabien Dessenne Cc: Ludovic Barre Reviewed-by: Ludovic Barre 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