Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2326729imu; Wed, 21 Nov 2018 09:53:42 -0800 (PST) X-Google-Smtp-Source: AFSGD/WgUitcLIJWvIGhZ8ZIXVCGhWOe+b6K7dNj7ypZVT0+KqvtmCg6HBxNKmrhsqWVskk++3Lg X-Received: by 2002:a63:6506:: with SMTP id z6mr6848870pgb.334.1542822822195; Wed, 21 Nov 2018 09:53:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542822822; cv=none; d=google.com; s=arc-20160816; b=tK5yPQczPajkMYbxU5hsW/2NOmqcptvHCUuKfsuzVjCGGjQGTgm1xziA/R0m+Tz7fT gWMcDynFD8CcAnYhzlLuxcheB0tHkoeR32QQUAlEDy/pwRJXeiUyc21yqH+1DrsYcOVm n2dQuYBqqDf1svZkLOGtTZhH+Va+WW3CbXShP51TeAbdWK6Mva0jfKl5Sqomfz6ka1z6 2N/1o107fp4FXydugl6LIN0WY/kLW+5ejfIMpk2Sz94EKfCSUNP8FcVVNZEKJizDr1rn keCRD5dqo1AvXE8CziCeb0qJnpZAK+p/7KNQaKwlX+dh7FPrhyF2pRMak32o7PKgR0xl Wi9Q== 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=DwU08G+VkQHQpvrVUWFcEHI2wbKrBDSdfvI/Gd4xUg8=; b=MgaBZoDexMMdNL7fPKzOPIq+gO1t7Acjgrvk/VESWBmzG7XaVRANdmIY6MrYHtmWdo fzRH40WnAv25U2psNOePduVsrRFWB9aE+Rry8iPWseVe7/MfD/9hFeqdpPQAk1Wo5XKf /uH8TV2Y9aHVzPq1/hjlKMv45NvoVbKDEWlIG2J2TN5ZooTdyKgdiR3FsK0oRd8fd5V6 N8KJiHDzg4j85HHNMcbI2cvn5YafC/QCAIdjQckPhnbs1eiDf0x4/EV4QEuuWItOo2+o 98ZxuMFs6I4JdxGW4WkSHawiYy7EzjMyXJZGMYJUHW1sbJqE2A3/I0xYFQLH5bWAr2/O Q9nA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=o0ulGM8R; 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 f38si46016258pgf.206.2018.11.21.09.53.26; Wed, 21 Nov 2018 09:53:42 -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=o0ulGM8R; 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 S1731255AbeKVB3c (ORCPT + 99 others); Wed, 21 Nov 2018 20:29:32 -0500 Received: from mail-ed1-f68.google.com ([209.85.208.68]:43541 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731231AbeKVB3a (ORCPT ); Wed, 21 Nov 2018 20:29:30 -0500 Received: by mail-ed1-f68.google.com with SMTP id f4so5095858edq.10 for ; Wed, 21 Nov 2018 06:54:45 -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=DwU08G+VkQHQpvrVUWFcEHI2wbKrBDSdfvI/Gd4xUg8=; b=o0ulGM8RBxC2FT4Hnn0LLLBw9T+KNPzbA3t6TATR3dUhGsHeWSZOPBlvzFx1Q2uwOy 5l6nV3gbrOEEO+4VwwbDmYKpfO4QE6OLKpBNEU7Xi/+g6aYdgRhJfnBrRWRBLalmTL/i xGWibYV2suem+ZMAENI0D9CVRE7d9eJ/J1tj3Omf0MeBJuEJfHBL7NIFLqkpPIyw5TP9 NUW9FnHEwa+7JRF+Qa9Fkoh3V6U3emLiS8H3RK1uz/YbdaRuIsaor/E39GcdfH7htSIN JeN6tTMiN82R/4Se/zShouGISvshONrwoBertecuWYBc9fzbU2J+hQt0SBR+oEXV/KwC qdnQ== 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=DwU08G+VkQHQpvrVUWFcEHI2wbKrBDSdfvI/Gd4xUg8=; b=LOsN4+mZGMCUAC8ks7m7f0wtWXW8Tir0NrlvmA8oLgr4gGvcotf6OybBCQwq1cq3L3 2wF41ZYZKGX9DsaayazOTaJhJMVPC3Hv4hNIuDdWX44zLTBuXSTK3oMY8hjuQD0vp8bS wFpX3ki1CTqPfRzyEw2bgzSXxDCwxdz7+D2BmgBQxP53odD/sS2DQrHWz4FnX+0oyuGB gy/cJehfPFmuClqVUn5z5uHeOpp349NMjoyjAXQxNfyQ794NyFzArPYKGRaJjXQZ6KaA n+GvTW111bQm5w+H5a6jpx85CJAiDKLjNtbJUE/07jKPgf+mgXh0/oQ+UQty4fEe3uOn f4jw== X-Gm-Message-State: AGRZ1gJ1rVls39MvjmM/KEMesrpPCEWbyy1LkIyulXQ3FbAxsfC0DLpR dySw503zgGd0H8q1B/KHHUo= X-Received: by 2002:a17:906:4e14:: with SMTP id z20-v6mr5124055eju.187.1542812084507; Wed, 21 Nov 2018 06:54:44 -0800 (PST) Received: from localhost (pD9E511F8.dip0.t-ipconnect.de. [217.229.17.248]) by smtp.gmail.com with ESMTPSA id j31sm10144887eda.46.2018.11.21.06.54.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Nov 2018 06:54:43 -0800 (PST) From: Thierry Reding To: Jassi Brar Cc: linux-kernel@vger.kernel.org Subject: [PATCH 09/19] mailbox: altera: Use device-managed registration API Date: Wed, 21 Nov 2018 15:54:19 +0100 Message-Id: <20181121145429.7582-10-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/mailbox-altera.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/mailbox/mailbox-altera.c b/drivers/mailbox/mailbox-altera.c index bcb29df9549e..397e25ddae29 100644 --- a/drivers/mailbox/mailbox-altera.c +++ b/drivers/mailbox/mailbox-altera.c @@ -341,7 +341,7 @@ static int altera_mbox_probe(struct platform_device *pdev) } } - ret = mbox_controller_register(&mbox->controller); + ret = devm_mbox_controller_register(&pdev->dev, &mbox->controller); if (ret) { dev_err(&pdev->dev, "Register mailbox failed\n"); goto err; @@ -352,18 +352,6 @@ static int altera_mbox_probe(struct platform_device *pdev) return ret; } -static int altera_mbox_remove(struct platform_device *pdev) -{ - struct altera_mbox *mbox = platform_get_drvdata(pdev); - - if (!mbox) - return -EINVAL; - - mbox_controller_unregister(&mbox->controller); - - return 0; -} - static const struct of_device_id altera_mbox_match[] = { { .compatible = "altr,mailbox-1.0" }, { /* Sentinel */ } @@ -373,7 +361,6 @@ MODULE_DEVICE_TABLE(of, altera_mbox_match); static struct platform_driver altera_mbox_driver = { .probe = altera_mbox_probe, - .remove = altera_mbox_remove, .driver = { .name = DRIVER_NAME, .of_match_table = altera_mbox_match, -- 2.19.1