Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1059167imu; Thu, 20 Dec 2018 09:25:26 -0800 (PST) X-Google-Smtp-Source: AFSGD/UJHUM+OyVnyUQCm1sgttn/N49MH1Z103lTZuKXajHhZDCVvs3Ln330euRppnRut2RshK1L X-Received: by 2002:a63:ba4d:: with SMTP id l13mr10837336pgu.194.1545326726914; Thu, 20 Dec 2018 09:25:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545326726; cv=none; d=google.com; s=arc-20160816; b=RQCrgPPGamN7ifad3EKtrdA9yv6tQTUCNe4y2hK7yOJV9QjGnqoDUH22nE9/NgYGWh Rfiy53rY9XwEttzCCqGueyLWrCcVhPBRsOeJTvmcbOG1BAQE8pFgDr4hUSelA++MDtsX 6LiPV85fzkEO3voDZgosEk0ozovSjg7Cr1i2fqzSOwE7YCa4DnmER+vtDfu4rx70ETdB 1DGSyYSSmIYyOovXWl4TSI+J1KJVaCAATxq76QR8rEC/ABNXz2VG9P65aB8rJEZncbux jw4v6RvJyWenQU7DJedqcSVltlDPQaMTtewaM6u0hKqr8le8l4CUQE8NOBE522EQhpcF VBUg== 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=gNOq9HM7IIA51VZQh4SQRXR3S46Yykx0FsGqyc+V3QU=; b=fBu8VA/UlaL6DQLDPXOdW0c3d1hIPdgFufh5jKtT+Vf2G4Bus08bfKJho2+VrksGq+ F48G2WYRj2dKEKj4UerU71yvhHBwRJhIreSItl0IPQC/Nre89oBrBrhWSmUuJzI7bBMx OGOoZ4VDsVfz1y+TNDhJiT9SzuKCR9wbkgTu6o/lOAtlw6uILMQkDK6gNgYvjWhDzVQU 3xEONTM5pMcDfr77jG5pxMdLfDtKlZSyJWToEaIyFiHA9fV7YZ2JYjppGVJyG2BhXa6F k2xtGzKQIpkSj0p3xWQkJJll4cP2Ld+huzG7gf7xv5M/A98dRdsnA1SzQhfLMdLbrprV y2fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=l9QlpD0k; 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 y189si19885207pfg.75.2018.12.20.09.25.11; Thu, 20 Dec 2018 09:25:26 -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=l9QlpD0k; 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 S2387871AbeLTRUX (ORCPT + 99 others); Thu, 20 Dec 2018 12:20:23 -0500 Received: from mail-ed1-f67.google.com ([209.85.208.67]:35300 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733095AbeLTRUU (ORCPT ); Thu, 20 Dec 2018 12:20:20 -0500 Received: by mail-ed1-f67.google.com with SMTP id x30so2414407edx.2 for ; Thu, 20 Dec 2018 09:20:19 -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=gNOq9HM7IIA51VZQh4SQRXR3S46Yykx0FsGqyc+V3QU=; b=l9QlpD0kNQpR7aGvhnFsJNmFij0Yo4Xw04UDcj5ID+YlpscjYb6RO6/1PE8ikQA3Bb Ln+t4oMyvLYQ69N9KGFrdYVX9AEHQfyq6KQkUX7qyr5NK6TwcFiCSeklHNtZ5sCcPDqH ppSHjAS1oDhsoAfl/0LKOpYr7PFT6/adG/MXdvTz++ztAYPcnoZmWs0M6OFJiU5m/JYd yWk0hClNc6Jo/etr85Q/zHJBAP+4guB/jQeN83OE5GjNhrFWXFMQJqEoOyEqucUIi5xi cSUXReYzmuzMz3EYUtjn00UcNepv/UylL5b6UOh3xKuK4vSGFqW9RICGUMyS76STThIK uZMw== 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=gNOq9HM7IIA51VZQh4SQRXR3S46Yykx0FsGqyc+V3QU=; b=hb/w9FNmMS3r93RIjuSToi4EGL8w1bEg2p0c7M8a0EbawfL1BGIFSwj3c613dds5FH xfsdTl5vDkQq2+0nmNMEMrOeobIO9rVDbLFKpDg53ie5NWC6lJWt9gGKwZumeKE//l+C 3IUYR/cTLb3PXePys6/5f48nqgxIA49Qbum2VROijTbbvdlYxAY3L94kbfrPqIgjNZeU 2cNzHrcFrPSKk6CLKtO7HRvYC4mvGxLusA3HdHOWixdo0CXzQUCadaF4U0MOh/zPCqFU 6H3eLlbttmMuEBmg6OkAqqUjzDYGaLdIP/gvJ6TqOD21LmfLgvE38cyCdww8r3pDWFmm eAUQ== X-Gm-Message-State: AA+aEWZjkFjNRJeBqEQnHa+bVgZtswZXGcwd+WHMsV3uhenX4t14ybuV vY5Dpj5QjrYpVC6N+9lABV8= X-Received: by 2002:a50:875d:: with SMTP id 29mr20106091edv.100.1545326418812; Thu, 20 Dec 2018 09:20:18 -0800 (PST) Received: from localhost (pD9E51040.dip0.t-ipconnect.de. [217.229.16.64]) by smtp.gmail.com with ESMTPSA id 24sm6326843eds.97.2018.12.20.09.20.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Dec 2018 09:20:18 -0800 (PST) From: Thierry Reding To: Jassi Brar Cc: linux-kernel@vger.kernel.org, Ley Foon Tan Subject: [PATCH v3 09/19] mailbox: altera: Use device-managed registration API Date: Thu, 20 Dec 2018 18:19:52 +0100 Message-Id: <20181220172002.9016-10-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: Ley Foon Tan 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