From patchwork Mon Oct 5 17:37:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Moritz Fischer X-Patchwork-Id: 11817143 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 BB499618 for ; Mon, 5 Oct 2020 17:39:59 +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 91A98207EA for ; Mon, 5 Oct 2020 17:39:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="V4x2ZYcR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 91A98207EA 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=lqpv6P/LEoECvaDANLvYaIxcdwnZ/lgVUeKjeprGYhs=; b=V4x2ZYcRbkoaFAK4zQiJ/oOcY Pt0YY8ZIl7yrm1LnqmTzioNm2RCFxmEqYW4WLGHFR1vwQCveioO6DtZPm+17JPPM4XgNjeBYxbgHr YsLvLkg7XVO8WSBssERYBK/inHTfoKIROPeTph1F+lZhaH9UN0+sH3paDCx7eSKpaUZlWil8Ou5zz Y3OQKfomO1rTjNpYNOTtjKRltI3H3ER9SqQ8QegGAs9OUXb+C2zznPyFj24th9+bvxdWE+JOqr/BE Bl6QJaokibtAiVZhe3LwFWjKV0SCGmJlEbRoNec0AXh99/GQUCA9F0mlcP90ncU8MbH+/rN1ImXmF hQLIrpbcA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kPURG-0007t5-E5; Mon, 05 Oct 2020 17:38:18 +0000 Received: from mail-pj1-f53.google.com ([209.85.216.53]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kPUQq-0007ii-AC for linux-arm-kernel@lists.infradead.org; Mon, 05 Oct 2020 17:37:53 +0000 Received: by mail-pj1-f53.google.com with SMTP id u3so207761pjr.3 for ; Mon, 05 Oct 2020 10:37:51 -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=l6D4+DnleUV85fmaN7MdBVnGTrFax41kLnobja/AhDw=; b=eToZ87QMjNQ/1aft3VuGJTXDqGWjJ1OtsJExRXJOKLjKPjwB6i0rJX+WhR9z/791Qf vH6oJDcAESYsTtHUNfQiiD3dx1gUW+AkmzFCPpDR+CRClCoyON2QXtC7iVurdFcgNpnO 4CCK/xNTuorItJ85hORyWASGFS9Ll5VkmUSzeOihtAtbyIygPGT8BqQGEgYAwlcb4zOo xxumq6EfDBy9jIJkl/7Sa53n0YWgNxcYEkORj4ReXXd5JuErYwKbQc6miG+lTK0EawOB eaKKp2iXCK2SuGTJ++8tQXI51xHT3KKv2Fq1dY2pZUqpA/i64skgRkbIJqnwICY8/a3G gQvQ== X-Gm-Message-State: AOAM530iUXzfgLfNWRuSs64ixLgzTbRpSbwN4GF75N61Sl7lRZaKAvkE yxkizZVTOsBo9Ia1MotjwEg= X-Google-Smtp-Source: ABdhPJxCACUo/RF7tmZdJ2UVUvDmOhvyynY18dFOWxStNR0l0MYGcBAjTIB5fTRyGhPf6lUf8jWKig== X-Received: by 2002:a17:90a:a512:: with SMTP id a18mr549922pjq.30.1601919471028; Mon, 05 Oct 2020 10:37:51 -0700 (PDT) Received: from localhost ([2601:647:5b00:1161:a4cc:eef9:fbc0:2781]) by smtp.gmail.com with ESMTPSA id g9sm225383pgm.79.2020.10.05.10.37.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 10:37:50 -0700 (PDT) From: Moritz Fischer To: linux-fpga@vger.kernel.org Subject: [PATCH v2 06/10] fpga: fpga-mgr: socfpga: Simplify registration Date: Mon, 5 Oct 2020 10:37:31 -0700 Message-Id: <20201005173735.162408-7-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_133752_402625_50792F29 X-CRM114-Status: GOOD ( 14.28 ) 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.216.53 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.216.53 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.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/socfpga.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/fpga/socfpga.c b/drivers/fpga/socfpga.c index 4a8a2fcd4e6c..1f467173fc1f 100644 --- a/drivers/fpga/socfpga.c +++ b/drivers/fpga/socfpga.c @@ -576,18 +576,7 @@ static int socfpga_fpga_probe(struct platform_device *pdev) if (!mgr) return -ENOMEM; - platform_set_drvdata(pdev, mgr); - - return fpga_mgr_register(mgr); -} - -static int socfpga_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); } #ifdef CONFIG_OF @@ -601,7 +590,6 @@ MODULE_DEVICE_TABLE(of, socfpga_fpga_of_match); static struct platform_driver socfpga_fpga_driver = { .probe = socfpga_fpga_probe, - .remove = socfpga_fpga_remove, .driver = { .name = "socfpga_fpga_manager", .of_match_table = of_match_ptr(socfpga_fpga_of_match),