From patchwork Mon Oct 5 17:37:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Moritz Fischer X-Patchwork-Id: 11817149 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 140886CA for ; Mon, 5 Oct 2020 17:40:33 +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 DC4C4207BC for ; Mon, 5 Oct 2020 17:40:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="xsGbf+7E" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DC4C4207BC 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=5ohxnflkPUoxgxkgjSh8IqcD1b7tepBq/uMw1vwn6WM=; b=xsGbf+7E5+emAg4ad+TCCQ2UO u74cqkQfRjQNEgLz66xjBzcn3aJaGgTIWxmsISb0Hfjj3pt6ydoQfOz38dbWBg8BZE14iljjlRrzC j0dozsxcmONOu0sE4JhmO8r5SrXKU2fRgd9wCY9xuRRZ/vnKOcVKbnP8H5SPLJ7V7UnwAOsQKs1qv gHZrwsrcHLyMcaiWn0Dq4a2mFazJvjm2BKeQviMO5g0Ymx1puqntqXOnT5Z85m4ng33qpWMlbGuqd vZZNc+45xJj9EM4BJ78obAQx19igfSULjCiFxpABBXDDHxBfmSgAxz7b9/OdxaBPloJGKYRJKnC3M Nma0vll6A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kPURc-00082Z-KP; Mon, 05 Oct 2020 17:38:40 +0000 Received: from mail-pf1-f169.google.com ([209.85.210.169]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kPUQu-0007kX-3E for linux-arm-kernel@lists.infradead.org; Mon, 05 Oct 2020 17:37:56 +0000 Received: by mail-pf1-f169.google.com with SMTP id l126so7407816pfd.5 for ; Mon, 05 Oct 2020 10:37:55 -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=J3XiBxLGBeSPFpAxZt+y5k3Cj/REy00FOrYxsXzSQuQ=; b=ZsW79+TqNvsLp2cJJvOWfIc2UPxTOqYJshGcaa+fjl5veLoGRwsUox7JjLeVwf2Fvi 5vj3vs1261GUlnMM2Bo1OYBB7RmAH2svtETGVsaxnU5mOMVM+id5MzoQ0vJGOum6Hb68 HQSUHojA6GZ0XXcI65RWK7shCLmr0UFLxxsZduxizREc9IA6fytJfRtTuOW3bvcUaLC6 TbgskuzGbwoE9BsLFa/Az/uyPf66aDcoJWIpJW7n9mSw9LsT3bh8eOFAE9IjWHO2uoBC R938LCU5IQBB5zW9Ki1w4qvTBAvbo+Og45jYUWkxuwRZnYtLjL/omBtWwpNeqpCWUdas RaGw== X-Gm-Message-State: AOAM5313K32KDo6peDRf3LZki0d9tO2Jb5FS3l4CgRtaaqx4iRNjogip 9cekco0QWkmFqOXyqYqbdEI= X-Google-Smtp-Source: ABdhPJyTtaSdPJRw1sHYWV0r1e3crx8Fd03UNMOyBkViknTat2ryvDRa43qd8CEpMlLrudH6Qa0F+w== X-Received: by 2002:a62:3541:0:b029:13f:ebd9:ad5c with SMTP id c62-20020a6235410000b029013febd9ad5cmr682191pfa.30.1601919474814; Mon, 05 Oct 2020 10:37:54 -0700 (PDT) Received: from localhost ([2601:647:5b00:1161:a4cc:eef9:fbc0:2781]) by smtp.gmail.com with ESMTPSA id f17sm533065pfq.141.2020.10.05.10.37.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 10:37:54 -0700 (PDT) From: Moritz Fischer To: linux-fpga@vger.kernel.org Subject: [PATCH v2 09/10] fpga: fpga-mgr: zynqmp: Simplify registration Date: Mon, 5 Oct 2020 10:37:34 -0700 Message-Id: <20201005173735.162408-10-mdf@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201005173735.162408-1-mdf@kernel.org> References: <20201005173735.162408-1-mdf@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201005_133756_187082_4E673911 X-CRM114-Status: GOOD ( 15.78 ) 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.169 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [moritz.fischer.private[at]gmail.com] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.210.169 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 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. Reviewed-by: Tom Rix Signed-off-by: Moritz Fischer --- 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),