From patchwork Mon Oct 5 17:37:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Moritz Fischer X-Patchwork-Id: 11817145 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 E8792112E 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 BEC36207BC 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="t/xHzMYB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BEC36207BC 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=jRGsbNuQxgC5bkFYws1GGENozjOnjpURgDjZCaX4ptY=; b=t/xHzMYBZZTvpD7+1d2nXH/6n 6Bmw3h9n9gHZ3AsowxnIAEUkkOvpfQfgisSvqSpI45nZ/A62JdX+DYiEdBFxARIoNmQPIqjCo9wtw hbLbPzYuyhX1SsFO3yTPsRyi8il18wIl/XvuGScGLKo0GntjkxJbHXhDnukOa2IJ55nl28hgNk8Cw KDpgxk5yQ1mu/KHjQPaixciqjDMTxY/q3Tv5bY0N6D9OBUCOkBKDbCG61jo2+ekjmt4BtsQiduRLC KzyxeItRJs9zOHK76t7eixwZphiPqvI/ynr9Ns9CYWjJ42A6iQYcLZzFKQZ7kFN+tx4wwp6M6r2Je QatveG9hA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kPUR8-0007pS-37; Mon, 05 Oct 2020 17:38:10 +0000 Received: from mail-pg1-f176.google.com ([209.85.215.176]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kPUQn-0007hT-VT for linux-arm-kernel@lists.infradead.org; Mon, 05 Oct 2020 17:37:51 +0000 Received: by mail-pg1-f176.google.com with SMTP id g18so4317220pgd.5 for ; Mon, 05 Oct 2020 10:37:49 -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=IjZwZs24cnHRvJI8qZINqO75sV6sdKQ+viQiqkSfwzU=; b=HKtEXUGPZ4PQlXOzOoBc6bg0xjINIsxiQ+N0UjkAPN/Va6WjTzFfUCpdJUOw6PpuLG tlTI9s5IKxCafo1/6t6VvOYnTowtEWXMKczuqGab/J5quURhWz5y5mj+GP8Z4GQiffJT wmYxqsgZag7zVQ/iE0TgzimckygMSXm3W8l2Hj65lRYG3PyljQCFwCBvS11C+DpN4Ks+ hqQo9LRU7cYwpKtS7x+coerOXypK1CbOvXmFbU5iSfOt1jLlpymJhhKOcDj486QGIB5J 79llQQApmcr21eWKgrhClQuOUGBv+ahzMpTeqLkrT1Bskbr10kIY2s592Jd2PDuCwv+w hlSg== X-Gm-Message-State: AOAM533r7d5DE8Bu3LI7iYn7DgYzyJ1fqpK5xh34KGIZX/n30/QLX57D sJQmGcI5mz1tC7GJHzAs4uAz7QcjLwo= X-Google-Smtp-Source: ABdhPJz+xTZGsV+G9I/y4Tu5r6e6ngwl1Wdi2JL23ASYEWVc9SGhzTOe+58nfh7bc/SlSiNneHHtCw== X-Received: by 2002:a62:52ce:0:b029:13e:50c8:499b with SMTP id g197-20020a6252ce0000b029013e50c8499bmr905498pfb.14.1601919468616; Mon, 05 Oct 2020 10:37:48 -0700 (PDT) Received: from localhost ([2601:647:5b00:1161:a4cc:eef9:fbc0:2781]) by smtp.gmail.com with ESMTPSA id q16sm486765pfu.206.2020.10.05.10.37.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 10:37:48 -0700 (PDT) From: Moritz Fischer To: linux-fpga@vger.kernel.org Subject: [PATCH v2 04/10] fpga: fpga-mgr: ice40-spi: Simplify registration Date: Mon, 5 Oct 2020 10:37:29 -0700 Message-Id: <20201005173735.162408-5-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_133750_106161_74EB99C8 X-CRM114-Status: GOOD ( 14.48 ) 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.176 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.215.176 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 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/ice40-spi.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/fpga/ice40-spi.c b/drivers/fpga/ice40-spi.c index 8d689fea0dab..69dec5af23c3 100644 --- a/drivers/fpga/ice40-spi.c +++ b/drivers/fpga/ice40-spi.c @@ -183,18 +183,7 @@ static int ice40_fpga_probe(struct spi_device *spi) if (!mgr) return -ENOMEM; - spi_set_drvdata(spi, mgr); - - return fpga_mgr_register(mgr); -} - -static int ice40_fpga_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 ice40_fpga_of_match[] = { @@ -205,7 +194,6 @@ MODULE_DEVICE_TABLE(of, ice40_fpga_of_match); static struct spi_driver ice40_fpga_driver = { .probe = ice40_fpga_probe, - .remove = ice40_fpga_remove, .driver = { .name = "ice40spi", .of_match_table = of_match_ptr(ice40_fpga_of_match),