From patchwork Sun Oct 4 05:14:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Moritz Fischer X-Patchwork-Id: 11815529 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 DE5A7139A for ; Sun, 4 Oct 2020 05:16:43 +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 B3E752068E for ; Sun, 4 Oct 2020 05:16:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="GqAiMS4r" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B3E752068E 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=Y0Fl5KtG3JvklO4Nf7AskohbkyQfrRD5aQ/pboBUsUo=; b=GqAiMS4rBVP9ZH9ooIttgveFU zj9LsGZ92zUe43B5jJH/kl04BK+oMx8Si2cbMxdXWnviWP4Zt4RYg2+iOgFNV0s6lsskxr28RBiq8 TSzhP3uLAJKtF1UPy8Y5C+3s1ySDIe61QrAYXddTL9/6t5QZ8mOcmuqP/H+q+rcH/OKwY3SIixndk oXRdCjMRnta2MRMaDTjGhqBATDKNHPb/JayuflXTzv84e2/LY6sGVKNgV7q5BJhPM+CNKPCUTg7Tu SLtqdWJHm+2GRMzfF7P/C/HhgVb/QkmB4320TqjGVRI5MuykuXmXEJPWKD0dy376PFpBoLwdtn/cK jxik4ECtQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOwMV-0007Ii-U9; Sun, 04 Oct 2020 05:15:07 +0000 Received: from mail-pg1-f177.google.com ([209.85.215.177]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOwMI-0007E5-FE for linux-arm-kernel@lists.infradead.org; Sun, 04 Oct 2020 05:14:55 +0000 Received: by mail-pg1-f177.google.com with SMTP id x16so3626020pgj.3 for ; Sat, 03 Oct 2020 22:14:54 -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=CY8rx+JPKKfkbPpYC3tH6s+YCb6Yq/lPkTs7PIs9fZ0=; b=RzYU4RckxJ7k68a1KXM2giaH6v+u9czFDm0NDxoqsYYIJuTrLoopQgwcFdhpcB5Xq6 1QDV8GLTlCgIuszjego/s8zG3E/AnUcRjdZB3pWamgEF4C7BUfa75sxOKFjMPD6d5vvr HfNgd275KAwhoRA4L6Kl8mCfw0X3akigUeHKvQX0L4KJBZ5cqrgrTCKejulWD/L1E/qq OIwuQuBjD/xmkrmRqDyLLIqtruD/yQ40y0nbxF+c33+OW1AxX3kgR2RwoSKrftWhu7fj Ql7UVWpGMsQZsiiKMQV55gpkcJIsS1YZsC2XjWMtx5XolwSp9eUNOg4ZGImG8rGanStc kgug== X-Gm-Message-State: AOAM531kXWrfwCdiDylx99VfVKUEx+kLCtJ2NH//RAPo2ETIFAgVJycc TrURAJ0Xk4CXUzYrZLfLo+XKnq9Tv7Y= X-Google-Smtp-Source: ABdhPJylfz6ldue6IS1BSmQ4jToXnd6z5f5GUuPiixCD0HN3WGR88U6ArNPlB8bpkX35XLSgpDCDIA== X-Received: by 2002:a63:5d66:: with SMTP id o38mr8617139pgm.366.1601788493258; Sat, 03 Oct 2020 22:14:53 -0700 (PDT) Received: from localhost ([2601:647:5b00:1161:a4cc:eef9:fbc0:2781]) by smtp.gmail.com with ESMTPSA id j25sm7459393pfn.212.2020.10.03.22.14.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Oct 2020 22:14:52 -0700 (PDT) From: Moritz Fischer To: linux-fpga@vger.kernel.org Subject: [PATCH 05/10] fpga: fpga-mgr: machxo2-spi: Simplify registration Date: Sat, 3 Oct 2020 22:14:18 -0700 Message-Id: <20201004051423.75879-6-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_011454_510584_A7BD6414 X-CRM114-Status: GOOD ( 13.68 ) 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.215.177 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 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.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.177 listed in wl.mailspike.net] 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/machxo2-spi.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/fpga/machxo2-spi.c b/drivers/fpga/machxo2-spi.c index b316369156fe..114a64d2b7a4 100644 --- a/drivers/fpga/machxo2-spi.c +++ b/drivers/fpga/machxo2-spi.c @@ -371,18 +371,7 @@ static int machxo2_spi_probe(struct spi_device *spi) if (!mgr) return -ENOMEM; - spi_set_drvdata(spi, mgr); - - return fpga_mgr_register(mgr); -} - -static int machxo2_spi_remove(struct spi_device *spi) -{ - struct fpga_manager *mgr = spi_get_drvdata(spi); - - fpga_mgr_unregister(mgr); - - return 0; + return devm_fpga_mgr_register(dev, mgr); } static const struct of_device_id of_match[] = { @@ -403,7 +392,6 @@ static struct spi_driver machxo2_spi_driver = { .of_match_table = of_match_ptr(of_match), }, .probe = machxo2_spi_probe, - .remove = machxo2_spi_remove, .id_table = lattice_ids, };