Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp36762imu; Thu, 20 Dec 2018 16:23:13 -0800 (PST) X-Google-Smtp-Source: ALg8bN5Ro1+XUIfMIBpjuZr9wPzwF8bzNxSYfmkClGn6qtAo4I+rsFi5yO0Bkr8Z/G6f7mX/rAcX X-Received: by 2002:a63:dd55:: with SMTP id g21mr334429pgj.86.1545351792930; Thu, 20 Dec 2018 16:23:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545351792; cv=none; d=google.com; s=arc-20160816; b=Nez+EPtKo/sIpPfshOxuXXivfYQKTelqXFj1Pmdl2fHZ9gbkrsJgDVv3aCV4HtGhan n9VAxATZAWpaUVHHu7oDTZFkfJn0Q+Zh+bmYTPCz1rMlOxw2cNmHuylWSk+gDLNv0LOg q3x35kzFsJ7dw1KgHjHptLhhGGUYV/1bNSGmKhOelZNxMNBn3cgnbcaIJdIa7etXr0De cQVuJogfDnYLynjLGmeJtAhPEHM8TAcUsJHUBsVfZqw8B4j55JdPWOEzwkPsaBAMXYyI I3afWE13dv/+AQwuGS+eIdG8dLDxWOKyTStqsipOnvucYowreFhcltgCrlsTEhVG5Hps DPgg== 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=W3DbdO8i8UCFTKJbfMwISGp/pjGqC8y7EdutvkAVqMA=; b=OUJxyg2HsSJnBgrppBtyDTtYS2mIPOnAgIx9eKISg8LcAuDOfaH4RSTatbS+jJMf/u bQ3LpWQbyxn2VYn2s7zNQIb7GW0EgmGsCRD/iyBcEJBuYpu8eBGUwrRCy9WxidLZf2ce 8qefARkLZ1RcohA1qaebSkIQs4UCk8fuhLfKkXoIbDGOkV8Cp1zfXZls7eg0Qw2OPDfE tmPciGBwZ3tKiUrbwgwEJGtCh2JyIHa00v3x3TgbNVhcMy9iJYNN11/PsxtW0UquEfbN JwDNWCWQZmnSQnWgYfTdqcSWv0jxqU9CPlBRgtvWwRq52KA6Eu+HT1/lapYW3YsMjUc1 wG3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nkEp9jBz; 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 q32si19302992pgm.410.2018.12.20.16.22.57; Thu, 20 Dec 2018 16:23:12 -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=nkEp9jBz; 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 S2387897AbeLTRU2 (ORCPT + 99 others); Thu, 20 Dec 2018 12:20:28 -0500 Received: from mail-ed1-f66.google.com ([209.85.208.66]:34149 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387816AbeLTRUV (ORCPT ); Thu, 20 Dec 2018 12:20:21 -0500 Received: by mail-ed1-f66.google.com with SMTP id b3so2418299ede.1 for ; Thu, 20 Dec 2018 09:20:20 -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=W3DbdO8i8UCFTKJbfMwISGp/pjGqC8y7EdutvkAVqMA=; b=nkEp9jBztFO/Az3B+X3xLwwji17qxILByMPfFkvTYSn5Lpx+cgIgzN3o5kprK2NmC3 JIbOY7O4z0O130gVtZO1s8E2adSFZ50CZukONkeXRMJKYs/fjiqyoVoYBhn6zSvMnqJy tKi9Rjlmd2SYbdKd/EalJq6pvLCKQG8w5ndreAj+ImprFxLP2KA4LYMEoZMmYOnXKn5k umnnqFyjz5+bZC6FVISENuTPTH/9mRPBJqKFkMqNZTrT4fmCgBzHtqqrr7DsIvxjUf4O x9swe1YqUxlc7Tj9erRxyOl+LaPqVGCNnw80m0h3TFTZIBZtGdl9AsMT7cAw0mIMGyUN zCcw== 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=W3DbdO8i8UCFTKJbfMwISGp/pjGqC8y7EdutvkAVqMA=; b=F0amBjdTh02TmZt4tcoN7de3YMEHYLxTlT4m7AdtDDqr0t1zYYzspOnDAZvIfUEerJ V38c8Yzab2PTcBo/ZrVBm251SOdChWPGV+DdFdREXth7b8D3+WQpyRxFFMp00hSzfX6g 6vJ/W/7TLKPmobKP/dgJQY1SpxLGPV+vzyUcc6SYGVOyAdOS/6K3YXbgc1Vgu3DSsSy+ dMPeKuNuf0s2W9XmRMs9R/h+jxsgdlzK/+QWW8H73g5vUiguvMM8NUOA+uepQzvBFZap K8Kk3pUPy4mEUGixFmoIlBvxWgnXV+cSdJcWkVu+A0igSZI4QhX/+0lq3UpV25y2x8Zi JWbA== X-Gm-Message-State: AA+aEWYKCOu/49SfV7xNLDVK8n2VXc44RdEfOTiJ0YGsqb5VAIg68U3r ant8XHNoOWBtn6QRZy/zkI6PIoWG X-Received: by 2002:a50:d085:: with SMTP id v5mr24205377edd.61.1545326420212; Thu, 20 Dec 2018 09:20:20 -0800 (PST) Received: from localhost (pD9E51040.dip0.t-ipconnect.de. [217.229.16.64]) by smtp.gmail.com with ESMTPSA id s46sm6525873edd.9.2018.12.20.09.20.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Dec 2018 09:20:19 -0800 (PST) From: Thierry Reding To: Jassi Brar Cc: linux-kernel@vger.kernel.org, Lee Jones Subject: [PATCH v3 10/19] mailbox: sti: Use device-managed registration API Date: Thu, 20 Dec 2018 18:19:53 +0100 Message-Id: <20181220172002.9016-11-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: Lee Jones Acked-by: Lee Jones Signed-off-by: Thierry Reding --- drivers/mailbox/mailbox-sti.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/mailbox/mailbox-sti.c b/drivers/mailbox/mailbox-sti.c index 779d41262ef0..adf82b85dbb2 100644 --- a/drivers/mailbox/mailbox-sti.c +++ b/drivers/mailbox/mailbox-sti.c @@ -462,7 +462,7 @@ static int sti_mbox_probe(struct platform_device *pdev) mbox->chans = chans; mbox->num_chans = STI_MBOX_CHAN_MAX; - ret = mbox_controller_register(mbox); + ret = devm_mbox_controller_register(&pdev->dev, mbox); if (ret) return ret; @@ -480,7 +480,6 @@ static int sti_mbox_probe(struct platform_device *pdev) IRQF_ONESHOT, mdev->name, mdev); if (ret) { dev_err(&pdev->dev, "Can't claim IRQ %d\n", irq); - mbox_controller_unregister(mbox); return -EINVAL; } @@ -489,18 +488,8 @@ static int sti_mbox_probe(struct platform_device *pdev) return 0; } -static int sti_mbox_remove(struct platform_device *pdev) -{ - struct sti_mbox_device *mdev = platform_get_drvdata(pdev); - - mbox_controller_unregister(mdev->mbox); - - return 0; -} - static struct platform_driver sti_mbox_driver = { .probe = sti_mbox_probe, - .remove = sti_mbox_remove, .driver = { .name = "sti-mailbox", .of_match_table = sti_mailbox_match, -- 2.19.1