From patchwork Sun Oct 4 05:14:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Moritz Fischer X-Patchwork-Id: 11815537 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DDFF4112E for ; Sun, 4 Oct 2020 05:16:47 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AD5DC2067C for ; Sun, 4 Oct 2020 05:16:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="PONvyeAz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AD5DC2067C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Z9nDbsKNqI+4DgaR+p2caESkK1su7t/Mf4A/zHxX+MA=; b=PONvyeAzyQx+KehvcnOAXdYhc 93Gi/gigIXPlNXrn/zAcXv5Cgo37rerR83hwyzoa5hF32KUQMAcByBzdFKGppyNkXVZkjOn1lU8e3 +ynZ5QF3tARadB8J+YEH3EGorCABmrBrfb48yH7fnprRS0i8Fs0ZIwEKz3OwyIWbvXqH0FNnDHpch BYOaugTXy55iZJ/JqJYu+93SN5Yt6F+w/HOF36/3ak6DKOhGGagq3fQ56NqNEzzGu61oBbUx18uWi PJHuJIPgdkkl6MgCY4QokgPH1bi6K/P5DxUl4CHZAgESFCLH6VgZ2iIv9wO6CTAVIxuFu1c3J2ECm k8v682rmQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOwMg-0007LY-Ni; Sun, 04 Oct 2020 05:15:18 +0000 Received: from mail-pf1-f194.google.com ([209.85.210.194]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOwMN-0007GD-6i for linux-arm-kernel@lists.infradead.org; Sun, 04 Oct 2020 05:15:00 +0000 Received: by mail-pf1-f194.google.com with SMTP id d6so4306358pfn.9 for ; Sat, 03 Oct 2020 22:14:58 -0700 (PDT) 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=l0sL7ADN3Hq+42GWHoUqJqayEjL3b9dF3MMfLH2Y9NQ=; b=q5HcA+1N6CcLCw3M5CHDvEp4wLfsFT7FlL/Lq8F0BQxiSCAqMWk71t3VvMi5Eyqd0f Y1Jsame7jYqDa124C3cW03y3rmXpNl0BCyb1e0F6WVL1fVX6sLDfD4b7hZ7zNU7YWfan 3ouXqEX3Mc4hgcKG23dEupa6h0f+7R6RASvmPDq0hOac6AkmfS6kMFw6h6JFFlnq9BIx 2Oq/hTY0QMvqbM6Olz11jOeowjTYy5Flscl2Xa1/x76OkE3+4AyPyiPM6A14x0TrAx5G b8WsvodbQWDnPURvV2UOWJPcQFv6QfUD4iLN9IyDe2JbvUPNP/5B5VqQ3HmTCUxKKCuU WGfw== X-Gm-Message-State: AOAM532JrxVMyB5ktalkhCdGfRr8zxDNNkza132IxwdLyyYMASZfIJMs TRSyof/znwWnvQb0r+e8xM1iUD4fRis= X-Google-Smtp-Source: ABdhPJzFayjCJtOlCCDp1euNS+8aBlvXNaFrFBJ5JLikW0r8Gujg+MhK1dPOtDj2wkEnQuwZAH6iVA== X-Received: by 2002:a63:1958:: with SMTP id 24mr8687000pgz.326.1601788498162; Sat, 03 Oct 2020 22:14:58 -0700 (PDT) Received: from localhost ([2601:647:5b00:1161:a4cc:eef9:fbc0:2781]) by smtp.gmail.com with ESMTPSA id x6sm6145100pjp.25.2020.10.03.22.14.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Oct 2020 22:14:57 -0700 (PDT) From: Moritz Fischer To: linux-fpga@vger.kernel.org Subject: [PATCH 09/10] fpga: fpga-mgr: zynqmp: Simplify registration Date: Sat, 3 Oct 2020 22:14:22 -0700 Message-Id: <20201004051423.75879-10-mdf@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201004051423.75879-1-mdf@kernel.org> References: <20201004051423.75879-1-mdf@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201004_011459_266761_E34D3F43 X-CRM114-Status: GOOD ( 15.27 ) X-Spam-Score: 0.5 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.210.194 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.210.194 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [moritz.fischer.private[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: russell.h.weight@intel.com, trix@redhat.com, michal.simek@xilinx.com, matthew.gerlach@intel.com, linux-kernel@vger.kernel.org, Moritz Fischer , linux-arm-kernel@lists.infradead.org, hao.wu@intel.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Simplify registration using new devm_fpga_mgr_register() API. Signed-off-by: Moritz Fischer Reviewed-by: Tom Rix --- drivers/fpga/zynqmp-fpga.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/drivers/fpga/zynqmp-fpga.c b/drivers/fpga/zynqmp-fpga.c index 4a1139e05280..125743c9797f 100644 --- a/drivers/fpga/zynqmp-fpga.c +++ b/drivers/fpga/zynqmp-fpga.c @@ -95,7 +95,6 @@ static int zynqmp_fpga_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct zynqmp_fpga_priv *priv; struct fpga_manager *mgr; - int ret; priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); if (!priv) @@ -108,24 +107,7 @@ static int zynqmp_fpga_probe(struct platform_device *pdev) if (!mgr) return -ENOMEM; - platform_set_drvdata(pdev, mgr); - - ret = fpga_mgr_register(mgr); - if (ret) { - dev_err(dev, "unable to register FPGA manager"); - return ret; - } - - return 0; -} - -static int zynqmp_fpga_remove(struct platform_device *pdev) -{ - struct fpga_manager *mgr = platform_get_drvdata(pdev); - - fpga_mgr_unregister(mgr); - - return 0; + return devm_fpga_mgr_register(dev, mgr); } static const struct of_device_id zynqmp_fpga_of_match[] = { @@ -137,7 +119,6 @@ MODULE_DEVICE_TABLE(of, zynqmp_fpga_of_match); static struct platform_driver zynqmp_fpga_driver = { .probe = zynqmp_fpga_probe, - .remove = zynqmp_fpga_remove, .driver = { .name = "zynqmp_fpga_manager", .of_match_table = of_match_ptr(zynqmp_fpga_of_match),