Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1057647imu; Thu, 20 Dec 2018 09:24:04 -0800 (PST) X-Google-Smtp-Source: AFSGD/V9lAPutd6znzse/FrCahIVNiPLKUz6FsekSALPeEBrMFS6lcwrmQrugkQVmMyT0Pr+Q0Bl X-Received: by 2002:a17:902:541:: with SMTP id 59mr25436323plf.88.1545326644287; Thu, 20 Dec 2018 09:24:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545326644; cv=none; d=google.com; s=arc-20160816; b=GuO/cbM59C2FBhD283gT17De58zAX58+gG4YolWbVvKnsimJ56xEX+k65WC5EMPn/b pbx5BvFg/DLRhvHUT8EGEg1JAZkVT/zrCylnHOXmihnFgmv5lZ3sTyFwVz2DfaLpRo9u eafOdmMTqlPut7yNaLpcrCs40BFdoCDLT3CuQnqgTzCL3kTgNBNNTj193iXAEzuIU3du 8bquRzYcFTW/gCLGmQi2xu7UxqnMyG8IJvvC6TYNT2324HiORTuTuSI7dIKVyyUgYlSf lzFBXKrgSZqJl6n4HFfyX/VnLndgE9nrKYqrpvHENq9q8tqMJ+o3MW0v1fZics+bFIYc jfZQ== 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=5PBex8woGQungQQ8B1o/PKC1WPxNLYtAwp4faI4sz6M=; b=wuV5vwRvaWdTcnNJ2nRPQUAK4FrRcYHE9IS5HKcx7MqyifYQM7OlHwxnh5uGD4XYhN xSkFw109cNcn+G+pwyQ0ZN7Wp3XKLS5B4ZXvOG+hODkmxaiHQqIMLVdFa/zAGmyvJosv k5iHCUhn+aUqT7RxK189itehFy3BokcLHK0UdTU6/iwYrtjURraZnvGoccD+Qb1RrFBB 1d64BWWM+cM7kJdUguEWdtoy2IHJuIZ7XJn+uUHb3tf3zAxl3zUUMXchI5t8na+sZxyc PctFhXJL8R25/2zwzFo+ACzknJTDcKHX+4qwOp7UjG8ZeSSyJrzQPKHT58b67ZU0FMcl FwpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=D3L2oyLz; 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 k72si17212000pge.310.2018.12.20.09.23.49; Thu, 20 Dec 2018 09:24:04 -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=D3L2oyLz; 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 S2388032AbeLTRV1 (ORCPT + 99 others); Thu, 20 Dec 2018 12:21:27 -0500 Received: from mail-ed1-f66.google.com ([209.85.208.66]:33200 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387868AbeLTRUX (ORCPT ); Thu, 20 Dec 2018 12:20:23 -0500 Received: by mail-ed1-f66.google.com with SMTP id p6so2420464eds.0 for ; Thu, 20 Dec 2018 09:20:22 -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=5PBex8woGQungQQ8B1o/PKC1WPxNLYtAwp4faI4sz6M=; b=D3L2oyLzSwAWv8lcSu7PZE8IUgnW+351Lbt41lMp3dl9MqJPlQggfJsCroIilSMtEQ uB27WWsSYEeLrRaeeYk7ce2HeCboGTDqif0YB5edCCnN6DSRSLmGMj1iYeMDILLCTwiG N9IuzOf74ICAF3L/bCf7P6xLvvQSI7A18Ez/qsXmwm+RvIi6Y7+/E+No1GH6Ur4VCo2X GoZdOnCPDE/5QZ6jpKUBLDSdCmoh64GA3Wvl49O0vZsWh2OTk4UILqLxXDGvyfbvazKe t9LAM6GO4gHGhlHl+EuE+ikS7XSCj+8GySU0blgZVBYuLiH9ntOFUtP2lVOlj5AzCleo PUMg== 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=5PBex8woGQungQQ8B1o/PKC1WPxNLYtAwp4faI4sz6M=; b=ShNTtfzM6tRfe+5k03QHAdhWj+35E329RPGM2g2kGRGyc5ZTHDtIOwFAFWG3wP75BW dibjpSY42D5W4ML/gM1gawW3BxTPxTksxfjeQx5hQqVgKm4Lp6oh4bXcMZfAt6y3j0Dj I7J5ARX/DODcBijkSkr1AOjZFTnqRGX1p2tO66qhCW3X+Ty3yWmejHI/Ihp08sHpkS9w OZ5OTglm+XF82kPSxTDTpxvOfVKZKk8EXAafYqI8jCBGU64f1l2+UqrcjPx2NLrOxZ4o ugi1b+gVHbkY2bzbTbSM77ZmLHkAkw9c4Fl4CdfVE0sWOrOvszO8izc7b1x1Br4UTrRp 0ncQ== X-Gm-Message-State: AA+aEWZAXCc37iwOQzX/kB9jwngLr+38HLDdMvzC6cCoxz5yQg+5OlRK +ciV27Huk4qmnuWq3pkxpb4= X-Received: by 2002:a17:906:35d9:: with SMTP id p25-v6mr20602004ejb.40.1545326421748; Thu, 20 Dec 2018 09:20:21 -0800 (PST) Received: from localhost (pD9E51040.dip0.t-ipconnect.de. [217.229.16.64]) by smtp.gmail.com with ESMTPSA id n29sm6210608edd.40.2018.12.20.09.20.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Dec 2018 09:20:21 -0800 (PST) From: Thierry Reding To: Jassi Brar Cc: linux-kernel@vger.kernel.org Subject: [PATCH v3 11/19] mailbox: xgene-slimpro: Use device-managed registration API Date: Thu, 20 Dec 2018 18:19:54 +0100 Message-Id: <20181220172002.9016-12-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. Signed-off-by: Thierry Reding --- drivers/mailbox/mailbox-xgene-slimpro.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/mailbox/mailbox-xgene-slimpro.c b/drivers/mailbox/mailbox-xgene-slimpro.c index b8b2b3533f46..8f397da1150b 100644 --- a/drivers/mailbox/mailbox-xgene-slimpro.c +++ b/drivers/mailbox/mailbox-xgene-slimpro.c @@ -224,7 +224,7 @@ static int slimpro_mbox_probe(struct platform_device *pdev) ctx->mb_ctrl.ops = &slimpro_mbox_ops; ctx->mb_ctrl.num_chans = i; - rc = mbox_controller_register(&ctx->mb_ctrl); + rc = devm_mbox_controller_register(&pdev->dev, &ctx->mb_ctrl); if (rc) { dev_err(&pdev->dev, "APM X-Gene SLIMpro MailBox register failed:%d\n", rc); @@ -235,14 +235,6 @@ static int slimpro_mbox_probe(struct platform_device *pdev) return 0; } -static int slimpro_mbox_remove(struct platform_device *pdev) -{ - struct slimpro_mbox *smb = platform_get_drvdata(pdev); - - mbox_controller_unregister(&smb->mb_ctrl); - return 0; -} - static const struct of_device_id slimpro_of_match[] = { {.compatible = "apm,xgene-slimpro-mbox" }, { }, @@ -259,7 +251,6 @@ MODULE_DEVICE_TABLE(acpi, slimpro_acpi_ids); static struct platform_driver slimpro_mbox_driver = { .probe = slimpro_mbox_probe, - .remove = slimpro_mbox_remove, .driver = { .name = "xgene-slimpro-mbox", .of_match_table = of_match_ptr(slimpro_of_match), -- 2.19.1