From patchwork Mon Oct 5 17:37:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Moritz Fischer X-Patchwork-Id: 11817117 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 56074618 for ; Mon, 5 Oct 2020 17:38:06 +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 232AC207EA for ; Mon, 5 Oct 2020 17:38:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="p4qHRB03" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 232AC207EA 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=wyl+g6cS2dt830UKFfzVJIXYVjBzvpzJ/KtG1WOTcVg=; b=p4qHRB03VRMkRLZ1nCMzGrVi8 SYRmWF0xGhF96R0TZNLVl2BVQSTCHihpS49lepO+RbzX6bWzLv2zgSEmxLLrXHjxUKvhmc+EdnG2r 8DVwOxLhKcMYxAZynE0zslOuAV3AMuM/stb5NdsuLF/N2WoxWK+9AkKYxPouZwaCDUF57R9vvIo16 +cJsBbIizG6W9yxnRzRS1Js5UdoqLmq0GAshPuaD3Q/Xs0+0Qeti04IY+fAPmE0ssUVBpMEgku6E7 gYmmhgaZLY7Va90JBgLTYfUQs2V9jyLNdmoy9ZOjGbdcsRk0wmbhbz+/2Hl1akKSFmyBpby4gisAD Ne55KGY3g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kPUQr-0007ip-Kw; Mon, 05 Oct 2020 17:37:53 +0000 Received: from mail-pg1-f195.google.com ([209.85.215.195]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kPUQk-0007fp-Af for linux-arm-kernel@lists.infradead.org; Mon, 05 Oct 2020 17:37:47 +0000 Received: by mail-pg1-f195.google.com with SMTP id t14so6435127pgl.10 for ; Mon, 05 Oct 2020 10:37:45 -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=tybOLLtw84rXzj8SWCLjMJDPl0218bwFPqf/Udii/sQ=; b=ZuXyySpMr93HWLaKxkETtlIHKXFX7UJV2WuW5dMqrodUxQgxBH/Jl1a5F/H2z42Kdb LdnsoUAyIp4MbDBaRfbyM+UK2W85ipL93CoV2ABElb1BCw1+hgCPYLHivDNk5oz/XC45 YtFxG0XWOJJW16RJLxatuv7rkpf+79zFei1bzHmcpO19Tz6YnsYdX2huk7V/farSfLZ8 x1ntj5BWNigWj3ixnml0z4YXdyxBQXPOqh7E/CBgmh4hBxCgXEqRKuMM45PzqBUTInSJ bqEPqcHYLRDZ5t15wtCeZVK2gJygRjKBQs4EdP6TT0MNZPDOVEhwOT3txT0mhJOO6unk LYqQ== X-Gm-Message-State: AOAM533plILdjk5WBPazvGQXp/DNB/44JlI9lvHuXBSh/+opGciZ+ySa ybdhW1TIv4MR5+1y0cIuZLE= X-Google-Smtp-Source: ABdhPJyx9fuPbSBu4xIJRLHVID+oD5yS5Ng1RbS88t2JGKT08aMhnSmNock/loTlXeSrXdv2rF1eDA== X-Received: by 2002:aa7:9522:0:b029:142:2501:3986 with SMTP id c2-20020aa795220000b029014225013986mr599718pfp.75.1601919464820; Mon, 05 Oct 2020 10:37:44 -0700 (PDT) Received: from localhost ([2601:647:5b00:1161:a4cc:eef9:fbc0:2781]) by smtp.gmail.com with ESMTPSA id g1sm183977pjl.21.2020.10.05.10.37.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 10:37:43 -0700 (PDT) From: Moritz Fischer To: linux-fpga@vger.kernel.org Subject: [PATCH v2 01/10] fpga: fpga-mgr: Add devm_fpga_mgr_register() API Date: Mon, 5 Oct 2020 10:37:26 -0700 Message-Id: <20201005173735.162408-2-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_133746_438835_FA266BD2 X-CRM114-Status: GOOD ( 21.62 ) 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.195 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.195 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 Add a devm_fpga_mgr_register() API that can be used to register a FPGA Manager that was created using devm_fpga_mgr_create(). Introduce a struct fpga_mgr_devres that makes the devres allocation a little bit more readable and gets reused for devm_fpga_mgr_create() devm_fpga_mgr_register(). Reviewed-by: Tom Rix Signed-off-by: Moritz Fischer --- drivers/fpga/fpga-mgr.c | 81 +++++++++++++++++++++++++++++------ include/linux/fpga/fpga-mgr.h | 2 + 2 files changed, 71 insertions(+), 12 deletions(-) diff --git a/drivers/fpga/fpga-mgr.c b/drivers/fpga/fpga-mgr.c index f38bab01432e..b85bc47c91a9 100644 --- a/drivers/fpga/fpga-mgr.c +++ b/drivers/fpga/fpga-mgr.c @@ -21,6 +21,10 @@ static DEFINE_IDA(fpga_mgr_ida); static struct class *fpga_mgr_class; +struct fpga_mgr_devres { + struct fpga_manager *mgr; +}; + /** * fpga_image_info_alloc - Allocate a FPGA image info struct * @dev: owning device @@ -625,9 +629,9 @@ EXPORT_SYMBOL_GPL(fpga_mgr_free); static void devm_fpga_mgr_release(struct device *dev, void *res) { - struct fpga_manager *mgr = *(struct fpga_manager **)res; + struct fpga_mgr_devres *dr = res; - fpga_mgr_free(mgr); + fpga_mgr_free(dr->mgr); } /** @@ -651,21 +655,21 @@ struct fpga_manager *devm_fpga_mgr_create(struct device *dev, const char *name, const struct fpga_manager_ops *mops, void *priv) { - struct fpga_manager **ptr, *mgr; + struct fpga_mgr_devres *dr; - ptr = devres_alloc(devm_fpga_mgr_release, sizeof(*ptr), GFP_KERNEL); - if (!ptr) + dr = devres_alloc(devm_fpga_mgr_release, sizeof(*dr), GFP_KERNEL); + if (!dr) return NULL; - mgr = fpga_mgr_create(dev, name, mops, priv); - if (!mgr) { - devres_free(ptr); - } else { - *ptr = mgr; - devres_add(dev, ptr); + dr->mgr = fpga_mgr_create(dev, name, mops, priv); + if (!dr->mgr) { + devres_free(dr); + return NULL; } - return mgr; + devres_add(dev, dr); + + return dr->mgr; } EXPORT_SYMBOL_GPL(devm_fpga_mgr_create); @@ -722,6 +726,59 @@ void fpga_mgr_unregister(struct fpga_manager *mgr) } EXPORT_SYMBOL_GPL(fpga_mgr_unregister); +static int fpga_mgr_devres_match(struct device *dev, void *res, + void *match_data) +{ + struct fpga_mgr_devres *dr = res; + + return match_data == dr->mgr; +} + +static void devm_fpga_mgr_unregister(struct device *dev, void *res) +{ + struct fpga_mgr_devres *dr = res; + + fpga_mgr_unregister(dr->mgr); +} + +/** + * devm_fpga_mgr_register - resource managed variant of fpga_mgr_register() + * @dev: managing device for this FPGA manager + * @mgr: fpga manager struct + * + * This is the devres variant of fpga_mgr_register() for which the unregister + * function will be called automatically when the managing device is detached. + */ +int devm_fpga_mgr_register(struct device *dev, struct fpga_manager *mgr) +{ + struct fpga_mgr_devres *dr; + int ret; + + /* + * Make sure that the struct fpga_manager * that is passed in is + * managed itself. + */ + if (WARN_ON(!devres_find(dev, devm_fpga_mgr_release, + fpga_mgr_devres_match, mgr))) + return -EINVAL; + + dr = devres_alloc(devm_fpga_mgr_unregister, sizeof(*dr), GFP_KERNEL); + if (!dr) + return -ENOMEM; + + ret = fpga_mgr_register(mgr); + if (ret) { + devres_free(dr); + return ret; + } + + dr->mgr = mgr; + devres_add(dev, dr); + + return 0; +} +EXPORT_SYMBOL_GPL(devm_fpga_mgr_register); + static void fpga_mgr_dev_release(struct device *dev) { } diff --git a/include/linux/fpga/fpga-mgr.h b/include/linux/fpga/fpga-mgr.h index e8ca62b2cb5b..2bc3030a69e5 100644 --- a/include/linux/fpga/fpga-mgr.h +++ b/include/linux/fpga/fpga-mgr.h @@ -198,6 +198,8 @@ void fpga_mgr_free(struct fpga_manager *mgr); int fpga_mgr_register(struct fpga_manager *mgr); void fpga_mgr_unregister(struct fpga_manager *mgr); +int devm_fpga_mgr_register(struct device *dev, struct fpga_manager *mgr); + struct fpga_manager *devm_fpga_mgr_create(struct device *dev, const char *name, const struct fpga_manager_ops *mops, void *priv); From patchwork Mon Oct 5 17:37:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Moritz Fischer X-Patchwork-Id: 11817121 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 6C0B2618 for ; Mon, 5 Oct 2020 17:38:11 +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 3E552207BC for ; Mon, 5 Oct 2020 17:38:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Sb6J9DDI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3E552207BC 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=uwPfX/8/d41y+nQIHDHbs7sfkf8mWsO85kpcv+vpSq8=; b=Sb6J9DDI7a3dHcvSWlsLmPawZ jdmqyZmJWqVoK1KbgAujSzH86vQsV08pq02o137XH1yhQxzLnLtR5iqMWTX73LdYPX2P+vBskpp6g /LhHYeilgDbXhovf0I2cQWFKz3r6SRJx500I3DG3WSDd/PEU3zR0+tfrFjeUlNlfle4YyG0bBOfne w3xCdxLnbh878YwSiQIACMSpSU473VCR+2o+CqIBqAiE5mnbXLLPjVWg/JijmzjEjsOaXuoBj74Dr pOrClGGBIiZTayh5u8ZdqSgah6G6QqpP5N2U3YpOjJ0kFcmUlVxutdZT1EOKLgfdUITJhkJig2DED g3zDoSR6Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kPUQw-0007lG-37; Mon, 05 Oct 2020 17:37:58 +0000 Received: from mail-pg1-f193.google.com ([209.85.215.193]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kPUQl-0007g9-EQ for linux-arm-kernel@lists.infradead.org; Mon, 05 Oct 2020 17:37:48 +0000 Received: by mail-pg1-f193.google.com with SMTP id g9so5930539pgh.8 for ; Mon, 05 Oct 2020 10:37:46 -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=wdqITJDQRbpmmuyzbiSajCMT3fTgONqCxlfl7IqR5tU=; b=ncfzhr6wEiQoS2lkdlN/VwyIn56EmjAuFel/7hfsfhcwvyUATb7MF9uVoyc0OIBZzy M62l5B7nUmZG0RJ7ocxXG6Hpfr1tqJpqfTvq5imfmvgbhNlqx7qP3fW9VSY5pMfe3vzu d3dCrOtTiUkL8MCUwSIGrV3Pb6XORFkexBBDdsLdl9wZg8Eu776gFyOTUMGZN/YxAEcX la/rQBye6BcORaet/g2/NjsxH0GrvWIW677XAu7Y4PwBRn7pBQExfc0kk6Bjm4Xz0tVp DxiXI1q90TjDBCEDamBGf3Um1PBFZDIWtxJ947gesaf7u8y1YpTWa5F4QXdVaOcV1LFQ aWNQ== X-Gm-Message-State: AOAM5324geIr7W5KXS183MdYzMWn6Yrq4/GDWwZHCyPH5owwvzKLQaKJ 6FAwfRi6uwemzAuQ050/TPA= X-Google-Smtp-Source: ABdhPJyEAGXc53tWtwzjvRMpUKdIkNcVVRhtV1iI9clNxea1rhdeEQ09BgMlQgzbOvT87bj9SQxytQ== X-Received: by 2002:a63:3d8c:: with SMTP id k134mr592201pga.22.1601919466093; Mon, 05 Oct 2020 10:37:46 -0700 (PDT) Received: from localhost ([2601:647:5b00:1161:a4cc:eef9:fbc0:2781]) by smtp.gmail.com with ESMTPSA id g9sm225231pgm.79.2020.10.05.10.37.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 10:37:45 -0700 (PDT) From: Moritz Fischer To: linux-fpga@vger.kernel.org Subject: [PATCH v2 02/10] fpga: fpga-mgr: altera-ps-spi: Simplify registration Date: Mon, 5 Oct 2020 10:37:27 -0700 Message-Id: <20201005173735.162408-3-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_133747_502432_5686C06F X-CRM114-Status: GOOD ( 14.13 ) 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.193 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.193 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 by using new devm_fpga_mgr_register() API. Reviewed-by: Tom Rix Signed-off-by: Moritz Fischer --- drivers/fpga/altera-ps-spi.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/fpga/altera-ps-spi.c b/drivers/fpga/altera-ps-spi.c index 0221dee8dd4c..23bfd4d1ad0f 100644 --- a/drivers/fpga/altera-ps-spi.c +++ b/drivers/fpga/altera-ps-spi.c @@ -307,18 +307,7 @@ static int altera_ps_probe(struct spi_device *spi) if (!mgr) return -ENOMEM; - spi_set_drvdata(spi, mgr); - - return fpga_mgr_register(mgr); -} - -static int altera_ps_remove(struct spi_device *spi) -{ - struct fpga_manager *mgr = spi_get_drvdata(spi); - - fpga_mgr_unregister(mgr); - - return 0; + return devm_fpga_mgr_register(&spi->dev, mgr); } static const struct spi_device_id altera_ps_spi_ids[] = { @@ -337,7 +326,6 @@ static struct spi_driver altera_ps_driver = { }, .id_table = altera_ps_spi_ids, .probe = altera_ps_probe, - .remove = altera_ps_remove, }; module_spi_driver(altera_ps_driver) From patchwork Mon Oct 5 17:37:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Moritz Fischer X-Patchwork-Id: 11817123 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 9A3FE6CA for ; Mon, 5 Oct 2020 17:38:16 +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 61557207BC for ; Mon, 5 Oct 2020 17:38:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="F1Qc4Xsg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 61557207BC 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=AP0DYxoNA49h2/3o+SDWSsAiKrmgoHN60ahfm2wjwmw=; b=F1Qc4XsgiglHuC51a/pBZZj08 bTRvZ4HSC944Iha8w+IJfGtyIFiO+EHjakloCQRclazSD78Fmnm6yQq8RWlfkcgkq2qLxWDlO2ksp Id5euW1qxWTc9/QRXExCtQoHC21YyGuGxyR5nCKmfjVJfiZLJ54GCkBo8YJgt0Kj1R+xH1KDakDIo cQwnqeHC2BrBN6vc3Yuop3TNyNco5GmNE9e/4pDatyt4TC32oIm6nFgRNp2Rjd10Th0dTkxPCb4hQ ikfhQ/dgZIqbbdf5g1PPwjQpTTEV0I9k8sxFwF50n5kJ/9A6QtZ7IlcWzhYDppAEybn4HoRI+Atak N2lAVgD0Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kPUR1-0007nF-5P; Mon, 05 Oct 2020 17:38:03 +0000 Received: from mail-pf1-f171.google.com ([209.85.210.171]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kPUQm-0007gr-Hz for linux-arm-kernel@lists.infradead.org; Mon, 05 Oct 2020 17:37:49 +0000 Received: by mail-pf1-f171.google.com with SMTP id b26so4060642pff.3 for ; Mon, 05 Oct 2020 10:37:47 -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=ThjGMNgrLrI2Onk47mH0ZJ6H9pM2blvwAMK0KJCWHWs=; b=tQPPY32BQDs2I0bG1CXlErw6glFqHr/54+ObwpJfVxiG4CPpLGm4XAjdYD3tX0zmX5 o+GoJ3DR9B4nXhu/shGNRH5eulLKeH6l8KwWNBtI0amUdzvhBXEz+ll5WwvfYAQ+EyKD 5t2dJh/lUADYy3+ytaORBr8Uyf8CwgswQzi/rzh7RmpBRb22EeGsSzaREiVJa1GcIiHs wvkNvUfhfLFJX4JecxW6OzHDbvRdpKKKHv5ywBG/IfaBTc6HohxDR/9gXe9CrWESv+8a f0dCf2swhFCx7z9bBojTZN8GnrdhdtRGB9BoWVmXKIwJh3254a0oHtd61ewxymeXwPoF 5XnA== X-Gm-Message-State: AOAM5300u22SUw1DCXEh6KqgTceXYmQPv/RWUgjX+Ghofg6ZLl2SlHIp saONGhFW1R2DNIUKM5S65UM= X-Google-Smtp-Source: ABdhPJxEdp5j5KzsM62NicgFATzxlcJoG8NRfOiT4HPR0BHeK2mXx3G8hMQ0HgCYon8j3czzKKqecA== X-Received: by 2002:a62:e308:0:b029:152:8cc3:ebdc with SMTP id g8-20020a62e3080000b02901528cc3ebdcmr663995pfh.42.1601919467294; Mon, 05 Oct 2020 10:37:47 -0700 (PDT) Received: from localhost ([2601:647:5b00:1161:a4cc:eef9:fbc0:2781]) by smtp.gmail.com with ESMTPSA id a185sm232173pgc.46.2020.10.05.10.37.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 10:37:46 -0700 (PDT) From: Moritz Fischer To: linux-fpga@vger.kernel.org Subject: [PATCH v2 03/10] fpga: fpga-mgr: dfl-fme-mgr: Simplify registration Date: Mon, 5 Oct 2020 10:37:28 -0700 Message-Id: <20201005173735.162408-4-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_133748_614286_72B37F1B X-CRM114-Status: GOOD ( 14.52 ) 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.171 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.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.210.171 listed in wl.mailspike.net] 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/dfl-fme-mgr.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/fpga/dfl-fme-mgr.c b/drivers/fpga/dfl-fme-mgr.c index b3f7eee3c93f..d5861d13b306 100644 --- a/drivers/fpga/dfl-fme-mgr.c +++ b/drivers/fpga/dfl-fme-mgr.c @@ -314,18 +314,8 @@ static int fme_mgr_probe(struct platform_device *pdev) return -ENOMEM; mgr->compat_id = compat_id; - platform_set_drvdata(pdev, mgr); - return fpga_mgr_register(mgr); -} - -static int fme_mgr_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 struct platform_driver fme_mgr_driver = { @@ -333,7 +323,6 @@ static struct platform_driver fme_mgr_driver = { .name = DFL_FPGA_FME_MGR, }, .probe = fme_mgr_probe, - .remove = fme_mgr_remove, }; module_platform_driver(fme_mgr_driver); 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), From patchwork Mon Oct 5 17:37:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Moritz Fischer X-Patchwork-Id: 11817129 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 2ED95112E for ; Mon, 5 Oct 2020 17:38:27 +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 03F0E207EA for ; Mon, 5 Oct 2020 17:38:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="bFR6X3nx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 03F0E207EA 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=gcCaRsmkpAffqs704P5bqpRtcYolAQlmG1IVIjkwP2A=; b=bFR6X3nxzPFJVbePuKAafdzdt tdJ/suBa58Eny/l+K9d1DaYot3kt+EIO3HzuJTUax9kI1nlu+V+xFvKz1uydF+5N3tXm+QUHaevEH qunPh2Ktpx8DlxuMmyu+hRoaURDz6oGkyUNA3i1HYaDQKChdnbVD5ic8vY41/E71rcAEdJf5mSBty ASoYPnd7xcel6wMbd0uFxvOLfWEm1hHOIrnQoozfl1Z+sJgtnXffUThXPAq4IvOpIJ8j0ZdXOymU6 OqG2fe3nLNGC+EU/tnhZ/WMuXPAE35nD0bT5G5h1859SmMGjUkZ/wleyXa1LC6ZQ35QR2nfLskNoH F478ETwRw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kPURC-0007rM-E2; Mon, 05 Oct 2020 17:38:14 +0000 Received: from mail-pj1-f47.google.com ([209.85.216.47]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kPUQp-0007iD-4z for linux-arm-kernel@lists.infradead.org; Mon, 05 Oct 2020 17:37:52 +0000 Received: by mail-pj1-f47.google.com with SMTP id x2so219044pjk.0 for ; Mon, 05 Oct 2020 10:37:50 -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=PJinqLCKTDe+aRSItigFp/wrvpdMWTGVdNBIcRnfBzA=; b=qW32BqVjAGG/MgWgCXmemNyH9ZAcfpJ8FStv4/hOfJaKCcduCfEp4M9+zNi56nyaRf yRuN/Okrq3dRhaKF9MalfJm0RP6Nsd737sK69RvMHJZiqh3qTqGYLmGNzKbuzpl2Z3g0 Th4C4lbCaK9bhv245rNSxwXXnbCsx0Jo8q6tB4t84Cy0ulWxAC8gRoG2VW6QlSGrLJRO TAUnQXdzf9l+q5QYiqZRxKwL36VIulhU6qsrv2bSaRzrM0IOBkLqtZ2ohCm65LBo1PSh CSJzvYtNMIEYfhnnaiwwCJOKKKvkajEkEG2SVwMyayvgb1VfwNiPDppcR2lzXYmAZ7eE njJA== X-Gm-Message-State: AOAM5310x/pR99XFIwzj370UmxrJkckoAyvE6An2zVpBd+RvJO1+3Adg DsxeISK04/sbuytC5HkF4rI= X-Google-Smtp-Source: ABdhPJwdvnEtZIDBh4qK3r1xDzccd0E4i+usLvtnb/8vdfe8iRjZfHrJt9UaCm9t4fceQLtH0RmFZA== X-Received: by 2002:a17:90b:f8b:: with SMTP id ft11mr544364pjb.8.1601919469830; Mon, 05 Oct 2020 10:37:49 -0700 (PDT) Received: from localhost ([2601:647:5b00:1161:a4cc:eef9:fbc0:2781]) by smtp.gmail.com with ESMTPSA id az18sm181250pjb.35.2020.10.05.10.37.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 10:37:49 -0700 (PDT) From: Moritz Fischer To: linux-fpga@vger.kernel.org Subject: [PATCH v2 05/10] fpga: fpga-mgr: machxo2-spi: Simplify registration Date: Mon, 5 Oct 2020 10:37:30 -0700 Message-Id: <20201005173735.162408-6-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_133751_250760_58D0FE17 X-CRM114-Status: GOOD ( 13.84 ) 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.47 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.216.47 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/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, }; 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), From patchwork Mon Oct 5 17:37:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Moritz Fischer X-Patchwork-Id: 11817133 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 B2140618 for ; Mon, 5 Oct 2020 17:38:34 +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 8486D207BC for ; Mon, 5 Oct 2020 17:38:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="lykg1oLV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8486D207BC 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=2gV9VQN0CxR3114xlNfLTA+C+lk9HlllTKhExfZW/Ck=; b=lykg1oLV9g8iwC77L53RD2P0R kHap65REL0Cuua+X1aDOLeeKyOCXOzWKwc8vtmi5eoFnl9U+dWq6GMRGwlMPie9EeFPQMPviOKzPB B+lddg+sdNR2/ctV0zewd3/58Cjr2f+AmRiZ2nPCplKYuaWEq0CIURjXi2fAcKWjt3XnDwWKKz74i 7qB6jUo5rLkImGD57VbwR88btRIUubmPdnyaRY4wB/rPmntbnw1FeE85fx1bioMwGef5+AENgfCXh Vy8663GglB6fKv6W6eZo9rDBuHysVhT0D3WfCPtmGiNbFIiMsik3GHcDYadkHe/IK2mBwcGo/J/KU vLZM3rODg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kPURJ-0007uo-IF; Mon, 05 Oct 2020 17:38:21 +0000 Received: from mail-pj1-f43.google.com ([209.85.216.43]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kPUQr-0007jP-LO for linux-arm-kernel@lists.infradead.org; Mon, 05 Oct 2020 17:37:54 +0000 Received: by mail-pj1-f43.google.com with SMTP id x2so219154pjk.0 for ; Mon, 05 Oct 2020 10:37:53 -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=/4TUUEH3mzxdF0JLPfTx+3VTCs6mAY0is3dcpH6g8XA=; b=Cg0Zhjwcz6s1pASHTvKz3YTLjPVvQriAxjTlX5Urxd22VVRAsKz1v1dRODUR7yCl2m tJ2ESMCi8Xj4la8pftE4ggZ1VUVBbLDjrGohlyFIDDKJZwRHbiz3e6jCPOehyQvbhGd3 wMtXE9gVMhLCuOaKfGjtrtN72afRVDlOHVXXgLWi/FxBbREebrUp8DZH/dlQfGaXXE40 4GcELC4ICygJFlwy056SRUl8HdyFPMo8JjOFTXJyZ4KkePwTlM4bgPNPwjJP8WRoTEi1 uVuaSAbI2QV8SOcSxg5D2BpQewuB5M5unftu9lWn3Q8oGFOMpZXnRucZcLeVzKeo/0xl gsqg== X-Gm-Message-State: AOAM533I0DSOf/Nt+3e4HeWU1/8GS9QsiG1g9fyPpiJp0PEK0+MqpXgT mAO3prUyet0vcumh+KZJdgE= X-Google-Smtp-Source: ABdhPJx4xXhbH1MWDvuiwBaaC/6SkRVdBbdml4IF7pL/5w77qJGI1HZWaZKi64MmXkAUtT5IDwCo6w== X-Received: by 2002:a17:90a:5588:: with SMTP id c8mr494907pji.224.1601919472219; Mon, 05 Oct 2020 10:37:52 -0700 (PDT) Received: from localhost ([2601:647:5b00:1161:a4cc:eef9:fbc0:2781]) by smtp.gmail.com with ESMTPSA id v22sm497846pff.159.2020.10.05.10.37.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 10:37:51 -0700 (PDT) From: Moritz Fischer To: linux-fpga@vger.kernel.org Subject: [PATCH v2 07/10] fpga: fpga-mgr: ts73xx: Simplify registration Date: Mon, 5 Oct 2020 10:37:32 -0700 Message-Id: <20201005173735.162408-8-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_133753_739085_4E653608 X-CRM114-Status: GOOD ( 14.39 ) 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.43 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.216.43 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/ts73xx-fpga.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/fpga/ts73xx-fpga.c b/drivers/fpga/ts73xx-fpga.c index 2888ff000e4d..101f016c6ed8 100644 --- a/drivers/fpga/ts73xx-fpga.c +++ b/drivers/fpga/ts73xx-fpga.c @@ -127,18 +127,7 @@ static int ts73xx_fpga_probe(struct platform_device *pdev) if (!mgr) return -ENOMEM; - platform_set_drvdata(pdev, mgr); - - return fpga_mgr_register(mgr); -} - -static int ts73xx_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(kdev, mgr); } static struct platform_driver ts73xx_fpga_driver = { @@ -146,7 +135,6 @@ static struct platform_driver ts73xx_fpga_driver = { .name = "ts73xx-fpga-mgr", }, .probe = ts73xx_fpga_probe, - .remove = ts73xx_fpga_remove, }; module_platform_driver(ts73xx_fpga_driver); From patchwork Mon Oct 5 17:37:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Moritz Fischer X-Patchwork-Id: 11817139 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 1ED86112E for ; Mon, 5 Oct 2020 17:38:48 +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 E7C982080A for ; Mon, 5 Oct 2020 17:38: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="sSNTBRkq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E7C982080A 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=WaUN0Ltw+L7ghachus4BDkdhF01eN4puTQ+BqmfB+bw=; b=sSNTBRkqzgyUR6lVqcaQEpNyf 8DZ/it2G7SW7GKKeg2kZ/Qe79WOi9/8MmTTq0CoZCrhaDe9GKV5amfUBCCsI3jciRfWCw1ysiC8Lw ISlUvrq+idkrWkhUqsyfok19W9GDl84sjxathISx1m9mZEGzQCX+YP9kz1dXc27zHR9zUpZBlBuGC 7djNv0JrU9uC1lUFgkh9HG22GD73Leb9Y9sgcCdI6qFy38FX54M4+fEut3LsC/Gvqc35wyW7sj6lD rS3PrB/uhbTgFX9dpvk1N+yGtHqICXjqV7JikbAsV5/Ia2m+Vg8vSdI3rYApyImvZUHSGLvV4zLH8 e8THacWCg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kPURS-0007z2-B4; Mon, 05 Oct 2020 17:38:30 +0000 Received: from mail-pf1-f171.google.com ([209.85.210.171]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kPUQs-0007k0-81 for linux-arm-kernel@lists.infradead.org; Mon, 05 Oct 2020 17:37:55 +0000 Received: by mail-pf1-f171.google.com with SMTP id w21so7398261pfc.7 for ; Mon, 05 Oct 2020 10:37: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=S5exJHrExp6hH+fiLalmCGHAHxK2W/BK4vVbjWgODn4=; b=Jy7Hf3ngqLDz6mTdryVlEAMlE605ZGsGT6CzTSPQqaB5sKHqzmN4+lyKHT/jRuEo1y 1oC7rYd2yNiw3dHSO8OH8arrJklCvW56yqHt3wmFMMiGdpjaaVpgBit/PBp7+tVOBNgp RwExOmoHDFijf2cOE0T/1O921+fIhG/VJ/SmbVkLaVybK3XKmwwpMwNdmvKYWamnlfvt u52XTSNKwYlYn58oPtqw7QOTh9gUMK4ey2HOuHJq1HJswXxsG0b3KAU/CttffymT911J KbUPPVYWCTY88+ZKhiwOAQC0P6cDvnKTJx8ZaB/KS40iP80ZYDNesbJ+h4u7s8ZmhjXL 8gsw== X-Gm-Message-State: AOAM532areFMIQJLj6KSFW0C9hvBGx6CRLbJes7T7ClFrC4gi/8s1GBo t3tzyuCNEhKkaTTPXuALtrQ= X-Google-Smtp-Source: ABdhPJx+vPTMXgGqXUfLGXSmTwUGiHqJ1pGXF30jVnvKd2Kzjtnaau7tvdWmbper+dTMFbKEvw9Duw== X-Received: by 2002:a62:54c4:0:b029:142:2501:34d3 with SMTP id i187-20020a6254c40000b0290142250134d3mr871545pfb.44.1601919473565; Mon, 05 Oct 2020 10:37:53 -0700 (PDT) Received: from localhost ([2601:647:5b00:1161:a4cc:eef9:fbc0:2781]) by smtp.gmail.com with ESMTPSA id f17sm533028pfq.141.2020.10.05.10.37.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 10:37:53 -0700 (PDT) From: Moritz Fischer To: linux-fpga@vger.kernel.org Subject: [PATCH v2 08/10] fpga: fpga-mgr: xilinx-spi: Simplify registration Date: Mon, 5 Oct 2020 10:37:33 -0700 Message-Id: <20201005173735.162408-9-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_133754_369830_3CA051C9 X-CRM114-Status: GOOD ( 14.18 ) 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_MSPIKE_H2 RBL: Average reputation (+2) [209.85.210.171 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.210.171 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.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/xilinx-spi.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/fpga/xilinx-spi.c b/drivers/fpga/xilinx-spi.c index 824abbbd631e..27defa98092d 100644 --- a/drivers/fpga/xilinx-spi.c +++ b/drivers/fpga/xilinx-spi.c @@ -259,18 +259,7 @@ static int xilinx_spi_probe(struct spi_device *spi) if (!mgr) return -ENOMEM; - spi_set_drvdata(spi, mgr); - - return fpga_mgr_register(mgr); -} - -static int xilinx_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(&spi->dev, mgr); } static const struct of_device_id xlnx_spi_of_match[] = { @@ -285,7 +274,6 @@ static struct spi_driver xilinx_slave_spi_driver = { .of_match_table = of_match_ptr(xlnx_spi_of_match), }, .probe = xilinx_spi_probe, - .remove = xilinx_spi_remove, }; module_spi_driver(xilinx_slave_spi_driver) 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), From patchwork Mon Oct 5 17:37:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Moritz Fischer X-Patchwork-Id: 11817141 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 DCA7B618 for ; Mon, 5 Oct 2020 17:39:05 +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 A926C207EA for ; Mon, 5 Oct 2020 17:39:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="qlH6CzoU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A926C207EA 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=qW2LVeNbKJKNHMvdXf6RLb6UhGHuxebMlwKNtCCF2VY=; b=qlH6CzoUgphWeeE0WIxfcIeVM Lk2n6+KXFMGlGt7+dY9457fs2n/RwAIDBTMlUs+WP8UvCkA7vnotP+LBlIqdWpEf4H4BKH0SpC3Kt l9nW1CUBsZ4JMwFLa7+klGuKXEkh8pjdoM8Ftrvxqp7NQAkyrLXaXpOtShSL2tuzIbFiXA4pIJitj nwiFkMX6++ZjyEGsRMH1noj+CoOzUA25Hm3hiarJ24Hc4fTclNXlajsfN7ckLcwK4RWTEhtTrIjxr qCl3QVn6liMoCJvA8psrqTLKZOQl6MxVXyYvHuDfunVmBnpZekya7NxtGscE66HjlDVGxe4G9hsIt jK2szUARw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kPURm-00089Q-4V; Mon, 05 Oct 2020 17:38:50 +0000 Received: from mail-pg1-f180.google.com ([209.85.215.180]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kPUQv-0007lH-AL for linux-arm-kernel@lists.infradead.org; Mon, 05 Oct 2020 17:37:58 +0000 Received: by mail-pg1-f180.google.com with SMTP id o25so6456929pgm.0 for ; Mon, 05 Oct 2020 10:37:56 -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=XAgCk2Aj0EBQWC6lNsaJJy1FnlIlYx98oy4GqXugUsw=; b=R80Cb6kdTP2el4haBNSckebYmCk5nJToCCP6W/NbgAhTucRMqWyHhHlehg6D1GLnkM 87W0su5TS+8D7TE03/7eDIitMXqGwAtkiBFxPBR5YReye+r6tn60q/+Wxii+EKuhSydw +mMmxbVJBKt0Y6agMvK5O/dov7WIAXGaXss1TpQO9sOz6bzJ2o2NbMR90460G8AwEAEs 5AHkLDdvZ8dMv8aGs+Purfetl8O8Wb7b98+PJi8bcL/FseHmbEVWKQhHLAhMvKQWm701 J58ybhQ/cc4bniU6dSyfurHw1ho5fLOs7fvB/LyrlISNJiE+J4ptTUDv5VFNWeLDaTnB p5uA== X-Gm-Message-State: AOAM531aapQOaa1RGl6TbOi+SgduCWqpdLlPGsvNq7S+j+TqhQeAV6IM aRCnDgRYqzBv5e2loQ+8uYs= X-Google-Smtp-Source: ABdhPJxvtbZsSqdj/IUfV+3xbG3z2hIR80XDqUCVjJ3wv+aLSOJddZ6DzLcotBHctSXzK3cQ46qH7g== X-Received: by 2002:a63:8f18:: with SMTP id n24mr540732pgd.209.1601919476076; Mon, 05 Oct 2020 10:37:56 -0700 (PDT) Received: from localhost ([2601:647:5b00:1161:a4cc:eef9:fbc0:2781]) by smtp.gmail.com with ESMTPSA id e1sm534796pfd.198.2020.10.05.10.37.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2020 10:37:55 -0700 (PDT) From: Moritz Fischer To: linux-fpga@vger.kernel.org Subject: [PATCH v2 10/10] fpga: fpga-mgr: altera-pr-ip: Simplify registration Date: Mon, 5 Oct 2020 10:37:35 -0700 Message-Id: <20201005173735.162408-11-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_133757_381393_2E7720DA X-CRM114-Status: GOOD ( 15.70 ) 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.180 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.215.180 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. Signed-off-by: Moritz Fischer Reviewed-by: Tom Rix --- Changes from v1: - Removed part that removes unused symbol --- drivers/fpga/altera-pr-ip-core-plat.c | 10 ---------- drivers/fpga/altera-pr-ip-core.c | 4 +--- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/fpga/altera-pr-ip-core-plat.c b/drivers/fpga/altera-pr-ip-core-plat.c index 99b9cc0e70f0..b008a6b8d2d3 100644 --- a/drivers/fpga/altera-pr-ip-core-plat.c +++ b/drivers/fpga/altera-pr-ip-core-plat.c @@ -28,15 +28,6 @@ static int alt_pr_platform_probe(struct platform_device *pdev) return alt_pr_register(dev, reg_base); } -static int alt_pr_platform_remove(struct platform_device *pdev) -{ - struct device *dev = &pdev->dev; - - alt_pr_unregister(dev); - - return 0; -} - static const struct of_device_id alt_pr_of_match[] = { { .compatible = "altr,a10-pr-ip", }, {}, @@ -46,7 +37,6 @@ MODULE_DEVICE_TABLE(of, alt_pr_of_match); static struct platform_driver alt_pr_platform_driver = { .probe = alt_pr_platform_probe, - .remove = alt_pr_platform_remove, .driver = { .name = "alt_a10_pr_ip", .of_match_table = alt_pr_of_match, diff --git a/drivers/fpga/altera-pr-ip-core.c b/drivers/fpga/altera-pr-ip-core.c index 2cf25fd5e897..5b130c4d9882 100644 --- a/drivers/fpga/altera-pr-ip-core.c +++ b/drivers/fpga/altera-pr-ip-core.c @@ -195,9 +195,7 @@ int alt_pr_register(struct device *dev, void __iomem *reg_base) if (!mgr) return -ENOMEM; - dev_set_drvdata(dev, mgr); - - return fpga_mgr_register(mgr); + return devm_fpga_mgr_register(dev, mgr); } EXPORT_SYMBOL_GPL(alt_pr_register);