From patchwork Sun Oct 4 05:14:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Moritz Fischer X-Patchwork-Id: 11815515 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 245A4112E for ; Sun, 4 Oct 2020 05:15:21 +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 E618A2068E for ; Sun, 4 Oct 2020 05:15:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="F1jiOSlz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E618A2068E 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=31rqe+10mJOu8beZls49Mv9T16InDtNpB7pNoIOCDQU=; b=F1jiOSlziypnJL9EtkJ4oFqN/ r8j6n+H0g/TYa3ZlspwjW/Y86G9yM9xF0LSsp8TBSnRfxRtTJroi9czWjl/atVZa+di4vmooXbHDt 2RQPY2Pf8yENT/goCT3spK+2gWe+9FpBsozQ3+/yH+DDnJ+8LdmKjCLIQh72Bn6Bb7g9YeO5Oi0p5 +aXrQs/PAJbgJXkPNcPEEOkggEO5mMzdcZO3g8ZQIIDpkD3IORJyhUHY2IjHz/h9TCPZGXtj6+Rif sXqB6xmTe+csKgNLaKgtKC53fd9WFZhvPLqlzoap/N/e2JbzKWdGDknyv8waqXxeFI6wdBpmS23pb V7p9RBCgg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOwMU-0007II-4C; Sun, 04 Oct 2020 05:15:06 +0000 Received: from mail-pj1-f65.google.com ([209.85.216.65]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOwMG-0007Cc-4E for linux-arm-kernel@lists.infradead.org; Sun, 04 Oct 2020 05:14:53 +0000 Received: by mail-pj1-f65.google.com with SMTP id b11so1039643pjl.4 for ; Sat, 03 Oct 2020 22:14: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=e9dROueXo0BgEtMsBpPMHaAR3SvNMce1Uv/F/sJsEdw=; b=NcdKCGeSyIXPknHGqU5MSd7QALqQxWW0Ai7CkfKhL71pmz3HBnyL/MfNxe2NDoC6Gn lOxtc2mc6Ul4cnjl6zC25+6K/a6Vzso8JARNvDTaVGcICLUSYs2VHmat3Lp/5RQzt2P3 AYoeceVnSwEsPP/jI7MBs4otpepolYq/vMkCTBqNPOVlO0733KGyUDQmZsmlPhzLXfvO RjWr8w3ntRHYOEARUIoi6zsLTRxNgPkGOv46xLE35DXWeC1QV5mypcR+g2x4qH0Ytww7 nMZ4Td13inAtqztipTGuYfd3nF7ooA08YYUh08sBRYBfF6KNViTRr1QQnmU4iosKAHAc PDIg== X-Gm-Message-State: AOAM530uNJyxgs1MKQ2iPc0hVuq+LjSiaczOus1mwdpBSRbRtyowEWA1 Eq4o5ihT5at8g8CuaQnub0A= X-Google-Smtp-Source: ABdhPJy8ZnJ4aY7II/coq6RV7KcdKTGw1X3kkzNwC1i68pFQCjiBz5fSZmzADaGy6b5tAgE/tMQzlQ== X-Received: by 2002:a17:90a:c28e:: with SMTP id f14mr10285907pjt.83.1601788488269; Sat, 03 Oct 2020 22:14:48 -0700 (PDT) Received: from localhost ([2601:647:5b00:1161:a4cc:eef9:fbc0:2781]) by smtp.gmail.com with ESMTPSA id d128sm7540251pfd.94.2020.10.03.22.14.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Oct 2020 22:14:47 -0700 (PDT) From: Moritz Fischer To: linux-fpga@vger.kernel.org Subject: [PATCH 01/10] fpga: fpga-mgr: Add devm_fpga_mgr_register() API Date: Sat, 3 Oct 2020 22:14:14 -0700 Message-Id: <20201004051423.75879-2-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_011452_197147_FEACE908 X-CRM114-Status: GOOD ( 20.76 ) 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.65 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.216.65 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.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.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(). Signed-off-by: Moritz Fischer Reviewed-by: Tom Rix --- drivers/fpga/fpga-mgr.c | 76 ++++++++++++++++++++++++++++++----- include/linux/fpga/fpga-mgr.h | 2 + 2 files changed, 68 insertions(+), 10 deletions(-) diff --git a/drivers/fpga/fpga-mgr.c b/drivers/fpga/fpga-mgr.c index f38bab01432e..774ac98fb69c 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 @@ -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,58 @@ void fpga_mgr_unregister(struct fpga_manager *mgr) } EXPORT_SYMBOL_GPL(fpga_mgr_unregister); +static int fpga_mgr_devres_match(struct device *dev, void *priv, + void *match_data) +{ + struct fpga_mgr_devres *dr = priv; + + return match_data == dr->mgr; +} + +static void devm_fpga_mgr_unregister(struct device *dev, void *priv) +{ + struct fpga_mgr_devres *dr = priv; + + 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 err; + + /* 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; + + err = fpga_mgr_register(mgr); + if (err) { + devres_free(dr); + return err; + } + + 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 Sun Oct 4 05:14:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Moritz Fischer X-Patchwork-Id: 11815517 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 DF0CB139F for ; Sun, 4 Oct 2020 05:15:21 +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 A5EC2206DD for ; Sun, 4 Oct 2020 05:15:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="r94Aw6u6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A5EC2206DD 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=D0TLsLAxU9HwEeVJAtgqPpdAwJ4pzUaXy6ScZdl0zfc=; b=r94Aw6u6UzfM7TTchTb71JqDC ltdd2CGPCv2Qq3CxeWkVvJROxTKG+4GSBy/tKb44If9eUHfnihTwPpdjZ3pP+IcTuLuRhV1mYZeQy 2SiO67dGdQqZ5n3pyDTpnJo0CwKg1Gsj16wEuBnCSmgSvHlpAwcdAxwNTl3U0Mhb/GE5xTH+NW6Oy mpVII8yva2HOww20xdLsDNSc82HIHHy4ETaELNJIZ4gof9KI0xLDuySZeJ2WBmqrpjXGj3GiK1iTe jvt6efkW1v0JavXxW4H+8+bz/Piaaj46c72Tts8OAkk8IyzSdPp1naasv5UtfoI+wqM7XXRmJ2azZ TkoAbjT0A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOwMI-0007EL-QU; Sun, 04 Oct 2020 05:14:54 +0000 Received: from mail-pj1-f66.google.com ([209.85.216.66]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOwMF-0007Ce-Q0 for linux-arm-kernel@lists.infradead.org; Sun, 04 Oct 2020 05:14:52 +0000 Received: by mail-pj1-f66.google.com with SMTP id gm14so3572808pjb.2 for ; Sat, 03 Oct 2020 22:14: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=d2zKZStKzcWmg98lvUeSyfN/9/+uQar1D5BGHJR0sMs=; b=qUl1a3OKVgs99p1zwzaJz3hZNHf73cCQbTmN6HevhWZ3h9ib88GrPmgRtD4TcGYNXp OmLIaTgRDw05MH9TRt1ewmTYWpKv4OtPXDwP4cAeJ8+VrevWfKVUFllqFmfnBTIAkoNK Dm7K+z/tmZ1FtS4UAYtBAxJurUGcz4YyuqIQfac9ZbU6efyPwYGqD7ER6X6JUArkgxVM Oug6Y26IBufyNBh5fFygH91Qk7/YM3584bRg6sbXXbJT3xRKzFAUX/9HA4lOIAbgHSuh zjdDocGh7Ti/qXKmuDD1bF3TcXRwx98Iwfsv/GlFTzDapnxvdgxhVJ2K+EoInqsvUwS1 G1Wg== X-Gm-Message-State: AOAM530C8tqrcjlik4UWtG63LegkHBGm3tuAAI9dTrRFH/eUNE49P++b mHGvHr6JS9avkVdjeK4eNJc= X-Google-Smtp-Source: ABdhPJxRYQRBkbg0GgZNWMM1nKDMiId/ovDb91fIRnSMkHNx4u7R6Ja/V7HikZ8TKKvNf6zwxSf1Eg== X-Received: by 2002:a17:90a:e545:: with SMTP id ei5mr10050838pjb.45.1601788489550; Sat, 03 Oct 2020 22:14:49 -0700 (PDT) Received: from localhost ([2601:647:5b00:1161:a4cc:eef9:fbc0:2781]) by smtp.gmail.com with ESMTPSA id i17sm7445294pfa.29.2020.10.03.22.14.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Oct 2020 22:14:49 -0700 (PDT) From: Moritz Fischer To: linux-fpga@vger.kernel.org Subject: [PATCH 02/10] fpga: fpga-mgr: altera-ps-spi: Simplify registration Date: Sat, 3 Oct 2020 22:14:15 -0700 Message-Id: <20201004051423.75879-3-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_011451_842349_17813EAB X-CRM114-Status: GOOD ( 13.59 ) 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.66 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.216.66 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.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.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. Signed-off-by: Moritz Fischer Reviewed-by: Tom Rix --- 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 Sun Oct 4 05:14:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Moritz Fischer X-Patchwork-Id: 11815509 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 2016B15E6 for ; Sun, 4 Oct 2020 05:15:18 +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 E129F206DD for ; Sun, 4 Oct 2020 05:15:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="xcEDsQYb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E129F206DD 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=Xc+2Z3Izx93WEaJ1EZFYQo+vy3G1njNMvSGnhGXZLwo=; b=xcEDsQYb8AY/MbeN766YdVEM/ tqU0lrUHpIl2Ur7yPQ12D5AHdO+XiBbmOgY02y6TrZ8zDHrhcvZWDzUvD8X4Rs5ue0emutXldaCby Kbn4enIYO4azo7bJuW21CGEtXm9Lr/u5VuUh7s7Uuv+NRhmMUFJWd12KN3D8H2HwI6Y1bTgFcD5dQ dz48PZxPc22qoEzGFhUqccZ/xx0LXMZOwMfG70jIWHrF1gcreRvmIAIWTgCdlJBz+ln68YwEgUWLs yfceI5vyWqglLFMHr3mVPtWvTnHixRFMU4UlyZjVGtd6Z67hMFbKPTst58og7DMeGfjjBKMuAyM/q I+AE5Ki0w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOwMN-0007Go-Su; Sun, 04 Oct 2020 05:14:59 +0000 Received: from mail-pg1-f194.google.com ([209.85.215.194]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOwMF-0007Co-Vw for linux-arm-kernel@lists.infradead.org; Sun, 04 Oct 2020 05:14:53 +0000 Received: by mail-pg1-f194.google.com with SMTP id d13so3617994pgl.6 for ; Sat, 03 Oct 2020 22:14: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=jSj7Q4DJpFXdzJS4vXtNFyUBZMMtSs/e2uyvh4UrDmQ=; b=mBLFbPDz7srUqpXWxb7H6K9tLmK2fudVtMr1SchwFciDBG144HhtOTPbR+O1Bp7n3z 5Vs0q+x2DqfCmv6he1tv64oZ1sJ9vUpuxUV3Q6NFgz0e/G9GK91vKLlt1XRkkf2PUeqz 27lQSFuVd7VXH7qBJH1736yYDTyg05sdwiEgRj8wpD0E+nkGiLl86SaoeEV9ksvxmQVB Qepp8eNDENWmoN0R5XDNDlJSSQNCz9dkdyTh1rsEue2Llk4OE334icAJOGG+XfWNx8nq ph80/8GeX25G/x+WAZifUtUMwcckZFoZR1p1V2rwqHU7AmT73nI7XwPDmBY8QIqHX6ZO D0rw== X-Gm-Message-State: AOAM532eQaJ6zr3KSOYXjyXEgierx8AIsSSSkXsc6z57JVppR5lwW3p2 a6+kcFEV43AVfEMCGZtnx2I= X-Google-Smtp-Source: ABdhPJybuo0dyW8OLj8mYrHhMS47SCaTGtBZJS+mWm/CWtLz6MfEeeQJWsN379s5pc735Hfm4Af9vA== X-Received: by 2002:a65:4987:: with SMTP id r7mr8670662pgs.228.1601788490855; Sat, 03 Oct 2020 22:14:50 -0700 (PDT) Received: from localhost ([2601:647:5b00:1161:a4cc:eef9:fbc0:2781]) by smtp.gmail.com with ESMTPSA id u2sm6249750pji.50.2020.10.03.22.14.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Oct 2020 22:14:50 -0700 (PDT) From: Moritz Fischer To: linux-fpga@vger.kernel.org Subject: [PATCH 03/10] fpga: fpga-mgr: dfl-fme-mgr: Simplify registration Date: Sat, 3 Oct 2020 22:14:16 -0700 Message-Id: <20201004051423.75879-4-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_011452_033030_F41AD842 X-CRM114-Status: GOOD ( 13.55 ) 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.194 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.194 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.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.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 --- drivers/fpga/dfl-fme-mgr.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/fpga/dfl-fme-mgr.c b/drivers/fpga/dfl-fme-mgr.c index b3f7eee3c93f..3fc2be87d059 100644 --- a/drivers/fpga/dfl-fme-mgr.c +++ b/drivers/fpga/dfl-fme-mgr.c @@ -316,16 +316,7 @@ static int fme_mgr_probe(struct platform_device *pdev) 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 +324,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 Sun Oct 4 05:14:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Moritz Fischer X-Patchwork-Id: 11815533 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 36BCA139A for ; Sun, 4 Oct 2020 05:16:46 +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 0AF962067B for ; Sun, 4 Oct 2020 05:16:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="srvCVx4h" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0AF962067B 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=+GbE0pTw/zSUG6IPtg4Ja5szWLpM1PPMvYpzrdJOdY0=; b=srvCVx4hGpCRflSqRWktT5uYS ajVOPfnp1yu82LYVAVnD/eQhEb6JVtZXDTiEyCWKDGn+u+e2Y4e4V12GCyxfyfAj0fgApq5ALHNEN /AVdMcIZ4jyH4/e9ULxWS09SLQcQmNpCg2ygkoFmVb5/cNWAA4Sgew7j9Iks1GbkNeJ8s+S4TZZPf m6RGx2+y2D0Sgp7WS4VIJNGhSQ8QBLagCzDxlGvk7GU/3uWBaLML8riCTlEaE5jw9pJI0bI4iH3Ee Kdc3fZCW/AFo6pdSqruOOBrYfwygIDpUYWthcs3oUTOhVKN7m+y/dOj0ffl9E4ZrEuvhqktk1ggtl jBhLxdZyA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOwMR-0007Ht-Gx; Sun, 04 Oct 2020 05:15:03 +0000 Received: from mail-pg1-f194.google.com ([209.85.215.194]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOwMG-0007Df-LQ for linux-arm-kernel@lists.infradead.org; Sun, 04 Oct 2020 05:14:53 +0000 Received: by mail-pg1-f194.google.com with SMTP id g29so3625044pgl.2 for ; Sat, 03 Oct 2020 22:14:52 -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=E9sNHTAf1q0OCWdfYetz8n+dad/hcYWb7WiyvqFz4z8=; b=gI5rVJ++ogk3Swb7Yya+q3Y6+1j0oz/EQItBBQkFF2yPVFbW1LNUyCkL+/wSY1zvrt En33BdVrdm3f5HwlqPKcPhVuAS/9WlkYai88ZQRRy5+6wV85c7W8oGoSLWCQxIbT/T+Z LlYTSqMxOe9ngb3R75LzIyD4Mm9HSm9aSmQkL9G349deMj/5m0quJzqs0xu5ydNcntRq H7oLel3gAe2zu5Wone3W4mH7QhFYmXP3Y+o9TUVRb/6A/UKdjWtvrWjqcTd2s6/+X7ua eL2FEQdCnHbTvXLL7pr7vS1DlTQXYRHFcWdL0eVokDw521/lpxg26/wDwrd0/AsRciBO luUA== X-Gm-Message-State: AOAM530PaEcGAcqQ04cgF0Tm6EReRVwfD6+MGrH5lav5V5P8xX7fblSs Bt2/DrmBJ7NsL6ON/+zsLsc= X-Google-Smtp-Source: ABdhPJxdCnzWHV+RefxbAoMh95yMnrJqDl2iYdqjGpXGo5cYkqv+xJUq4Y6Ol3KlPXz1LZG6F2FSKw== X-Received: by 2002:a63:5006:: with SMTP id e6mr8795282pgb.338.1601788492032; Sat, 03 Oct 2020 22:14:52 -0700 (PDT) Received: from localhost ([2601:647:5b00:1161:a4cc:eef9:fbc0:2781]) by smtp.gmail.com with ESMTPSA id r14sm6588558pgm.7.2020.10.03.22.14.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Oct 2020 22:14:51 -0700 (PDT) From: Moritz Fischer To: linux-fpga@vger.kernel.org Subject: [PATCH 04/10] fpga: fpga-mgr: ice40-spi: Simplify registration Date: Sat, 3 Oct 2020 22:14:17 -0700 Message-Id: <20201004051423.75879-5-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_011452_751541_31DA6DCF X-CRM114-Status: GOOD ( 13.75 ) 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.194 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.194 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.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.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/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 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, }; From patchwork Sun Oct 4 05:14:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Moritz Fischer X-Patchwork-Id: 11815523 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 0B74F112E for ; Sun, 4 Oct 2020 05:15:24 +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 CFDBF2068E for ; Sun, 4 Oct 2020 05:15:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="cUa2pXIt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CFDBF2068E 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=msf3P2d+cRB5Cx7JLa7AJmj8CV+RjSJDKzjTB2Mress=; b=cUa2pXItruu/CLI+6zK+RlQs+ XzNY1Qb9wN+IDOwHYkrJYKolUX/k/C9qZ/sH/5oSmIyR5mCfZDDtMUSV+KP8HejNTwQpKCcdYGBLo dbaCWIZN8opL0+4MLm6JjzwG5Y49zIUmvVLxUfegjqLlC5iCK6KkK9OZwzaOLdVCIRvAGfq6izWTw NhGwQze6X5BWIPNyQZeSujrlVmmtAdoKJZqZT1lyQMQYzlL09Nwvzc/7BX3NFExDf5/O9RMZZ5gql KalgXLRwLg3NMVCGk8sPQBc6GF4M6IRKLPfZ/SwIebtR5+5Fnka7O7aVVpKY1ok5SENNtks+Xyk53 YDg+A7nTQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOwMZ-0007Jd-Em; Sun, 04 Oct 2020 05:15:11 +0000 Received: from mail-pf1-f196.google.com ([209.85.210.196]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOwMJ-0007Ed-Ls for linux-arm-kernel@lists.infradead.org; Sun, 04 Oct 2020 05:14:56 +0000 Received: by mail-pf1-f196.google.com with SMTP id d6so4306303pfn.9 for ; Sat, 03 Oct 2020 22:14: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=YHhb/VGZB3JzU7sTnLssu5Jr3MlGXPj+7Lz+7APODO4=; b=r7vtEl0wxii5PQHsiKMAxqeveOaiHuY0OalBi4L+/mSspsJWuqFrfY/xP4dAvU9JLF PY+zWtCn7EhQC2AxqyNneXvD967ISxqIb8YuV88PPgmQ3/1217rinMVaLeuyJt31YBBq 9+iE5d6E4qQPKrcqVdBltbJnDdFYlSKNdSb+nu8gKiQGs3ZBaDO+53wG0HdMHTu9z5zl wsnh1jyFXG0QVRNvyUCeswr+86Z+WxxXhXKoq7KLvBI/Nej4Aag1/90dBSHdK65twQ2D wV0LseE9rF7OCQvcX2ExSdOZvX73imkWcTUHJTnxSxShUMqtFZ/VXvq64Dm00TOLmP5F sGgA== X-Gm-Message-State: AOAM532nvQV+MDKD523HoFMhHCo7YtJRLPH/Gb9sS7DBsj6wtrkB2Bhb f7CkBnqWR7pGFjdAp7WOsVM= X-Google-Smtp-Source: ABdhPJypO3sAzA2yTYLx70pX8unTTAwZWlujyB1hECE+9ksvS4oO4ztuZCuq9g4bz+o+Q+Ekpx0doQ== X-Received: by 2002:a62:2b8d:0:b029:151:d7b8:ad58 with SMTP id r135-20020a622b8d0000b0290151d7b8ad58mr10508110pfr.51.1601788494519; Sat, 03 Oct 2020 22:14:54 -0700 (PDT) Received: from localhost ([2601:647:5b00:1161:a4cc:eef9:fbc0:2781]) by smtp.gmail.com with ESMTPSA id b16sm6189565pgj.77.2020.10.03.22.14.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Oct 2020 22:14:54 -0700 (PDT) From: Moritz Fischer To: linux-fpga@vger.kernel.org Subject: [PATCH 06/10] fpga: fpga-mgr: socfpga: Simplify registration Date: Sat, 3 Oct 2020 22:14:19 -0700 Message-Id: <20201004051423.75879-7-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_011455_962301_83252F87 X-CRM114-Status: GOOD ( 13.75 ) 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.196 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.210.196 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.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.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/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 Sun Oct 4 05:14:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Moritz Fischer X-Patchwork-Id: 11815535 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 D3EA4139A for ; Sun, 4 Oct 2020 05:16:47 +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 A7FC32067B for ; Sun, 4 Oct 2020 05:16: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="yEdSQKkZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A7FC32067B 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=0Q+GDUVA+ZqDczbuw6wNIC12y2p36Fu7Lz6O2adjG3g=; b=yEdSQKkZ89R/bPPntT/xFYlZZ O7g+goA79oudTNHwhR1giuDbrN73XYbuZp2h87RU8kuS4BcQCjU2BgIYBLshmv/ZHpYOhkGPttFl7 kXY6ZO4RLD/XJoe9CHLrK4KuNdSiWqZTGAcF4iweCpHVEmAvnZW/X9y2+xnMjh+Y0J/ad3u/4xS9B NVd6ZrZZKC1vvNsjZIweqDkyNGIpNB2BfRVamixV8W1YQGHBq4zPmfefcvBXxUFOACNOs9LtTwLcN vLYI/mC0/lryS9KVq7pLsLnuuwUaKGwZGDHJsGGDdIsHjmAxWrcUmxq9ZtifgkcaIWkTEtIBkfHMB A0KmhJ8jA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOwMb-0007Jz-5n; Sun, 04 Oct 2020 05:15:13 +0000 Received: from mail-pj1-f66.google.com ([209.85.216.66]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOwMK-0007F2-FB for linux-arm-kernel@lists.infradead.org; Sun, 04 Oct 2020 05:14:57 +0000 Received: by mail-pj1-f66.google.com with SMTP id kk9so3344249pjb.2 for ; Sat, 03 Oct 2020 22:14: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=FaAVNF3/AlS92Q3NEttM+dWDO+XxWPGiLzHX02RqSVo=; b=sItDi11Pop6A5XXow5FvvejfxaEmJ/+4Rr97ejKLi78SENJV01FvKL67ZHH4ra3jYS Elwf8mU3tXZ3NYdu/mv3U/3IsD/fqHbqeL+WW9Napu41Ej2ziYWUUiIvWnI/Epxx/XR3 VQCK+IJl9bWhrXk8ny3LUO3SyIahbQfyxy2BDnbCl8OrcIi+rXJCgV1IjDdjCowNUt0d q8fOntdSwyhpjI3BfGuW2t0XOR69KxubOLcduHFyyX5sJvfv+LpBYxyEEYwrxQqFM6BQ MhbvlcGISYJrIjx0IdEy5GHl9dAHLERgwrqbNU3HLPP18oAYFGvdJfj/M1fwW4Q2fmQD bG+A== X-Gm-Message-State: AOAM532wUebjP/XQ+ROvYWuPi60E2r6AmkFoafY3anTaiogCIB/17hb4 as4AX2JQh7d446X2j9udEvk= X-Google-Smtp-Source: ABdhPJwNlr6JI0F4V2li4qN9l3534sjOYx5SocCCZjzYxaKbo6UgCuL2JAYmNNUb2HAmJgoHrgbflw== X-Received: by 2002:a17:90b:4d0d:: with SMTP id mw13mr10418192pjb.192.1601788495740; Sat, 03 Oct 2020 22:14:55 -0700 (PDT) Received: from localhost ([2601:647:5b00:1161:a4cc:eef9:fbc0:2781]) by smtp.gmail.com with ESMTPSA id i62sm7782184pfe.140.2020.10.03.22.14.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Oct 2020 22:14:55 -0700 (PDT) From: Moritz Fischer To: linux-fpga@vger.kernel.org Subject: [PATCH 07/10] fpga: fpga-mgr: ts73xx: Simplify registration Date: Sat, 3 Oct 2020 22:14:20 -0700 Message-Id: <20201004051423.75879-8-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_011456_613941_F2607F19 X-CRM114-Status: GOOD ( 13.86 ) 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.66 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.216.66 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.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.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/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 Sun Oct 4 05:14:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Moritz Fischer X-Patchwork-Id: 11815525 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 8AB3B112E for ; Sun, 4 Oct 2020 05:15: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 590C2206DD for ; Sun, 4 Oct 2020 05:15:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="AUQvFRaE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 590C2206DD 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=lJvEUg33bXbh20owsKD0lk5tKLnVVqe2Ye+1IeNhjz8=; b=AUQvFRaEgKFnQpFBoQL7n31rY qwnDvwDa81wZHmOoII2t5/FT6Dp3oer78g9b5MVhFwd3qmGu/gJFbfdl/rHixbT/0fwOX24RX4qwX Vg1PY1DANvs4utrxtb9n6W0ROJlChOwUrZ0/J14rFA6gDOwl6R+2RamnHKLZhItMGDpYU6COz5BX+ olSenp5Knk5nHtacpFwzyMn1gEJYr4X6I7BOzUXVMkJyEr1nqCoJHr32lyJFjJ5twnjx7DQoHGXCx j+QwIhAUPSXA9xFYW3qNrjxxLK+4N/YkjloatesFa+ml/QIssTofcrM9MXjZZ8j72prhFBrbEtsxI uGmXdjDCQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOwMe-0007Kx-KL; Sun, 04 Oct 2020 05:15:16 +0000 Received: from mail-pf1-f196.google.com ([209.85.210.196]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOwML-0007Fe-KK for linux-arm-kernel@lists.infradead.org; Sun, 04 Oct 2020 05:14:58 +0000 Received: by mail-pf1-f196.google.com with SMTP id d6so4306346pfn.9 for ; Sat, 03 Oct 2020 22:14:57 -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=47sHf0OnbQAgrjSXH2UeNqKvTmvp8QgcUk98MlVaxRo=; b=isxkl954fqVOTmFjKbfZdgnl4QL7IT2SBh4CCMBlgy4RM/WunVTgBq7g03q+z4SygC KCoXFBo3ysPAmTVUTPv1WV4Ij9fqvRkbkb4/bEO6LzHDpxe/WUUxYxjCktrb8x0NFGIb FPNYpv0+aC3c/wpPUb9pjou+wlLjPci5Wd5UaJDf3UOPrXMssF1JZlBRXpZ0rJlTUMLD AOl02oPccdWjL4JmgpH5PpY9CnTl54ZxOAJJyCSNGwP5vJFo6LMOcxAJ5eLwmx4To3k0 SVU79suaR9OEjAeOSV8GSD7ptqzznFWmb0c5nk9cOFhx171ggo9KusWEDPJhlp5vj6y/ dJVg== X-Gm-Message-State: AOAM5334ThZmZpr4ahgdv6WI+1AcJp+F+q0lfb1p+bYLiQLDOvXZD0A+ 5/ICLkk6fbwfAqZtt5maJCo= X-Google-Smtp-Source: ABdhPJwvB3KaWGtsz2s+wyqr5IaazCnC6zzrFStHbeGJ/MYzvM7nhhvGhl36qlG0BApYbR1ts1mxsg== X-Received: by 2002:a62:1d06:0:b029:152:1b07:7e3b with SMTP id d6-20020a621d060000b02901521b077e3bmr10594286pfd.30.1601788496952; Sat, 03 Oct 2020 22:14:56 -0700 (PDT) Received: from localhost ([2601:647:5b00:1161:a4cc:eef9:fbc0:2781]) by smtp.gmail.com with ESMTPSA id 5sm4505745pfg.152.2020.10.03.22.14.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Oct 2020 22:14:56 -0700 (PDT) From: Moritz Fischer To: linux-fpga@vger.kernel.org Subject: [PATCH 08/10] fpga: fpga-mgr: xilinx-spi: Simplify registration Date: Sat, 3 Oct 2020 22:14:21 -0700 Message-Id: <20201004051423.75879-9-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_011457_731413_BB556BCE X-CRM114-Status: GOOD ( 13.64 ) 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.196 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.210.196 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.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.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/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 Sun Oct 4 05:14:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Moritz Fischer X-Patchwork-Id: 11815537 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 DDFF4112E for ; Sun, 4 Oct 2020 05:16:47 +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 AD5DC2067C for ; Sun, 4 Oct 2020 05:16: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="PONvyeAz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AD5DC2067C 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=Z9nDbsKNqI+4DgaR+p2caESkK1su7t/Mf4A/zHxX+MA=; b=PONvyeAzyQx+KehvcnOAXdYhc 93Gi/gigIXPlNXrn/zAcXv5Cgo37rerR83hwyzoa5hF32KUQMAcByBzdFKGppyNkXVZkjOn1lU8e3 +ynZ5QF3tARadB8J+YEH3EGorCABmrBrfb48yH7fnprRS0i8Fs0ZIwEKz3OwyIWbvXqH0FNnDHpch BYOaugTXy55iZJ/JqJYu+93SN5Yt6F+w/HOF36/3ak6DKOhGGagq3fQ56NqNEzzGu61oBbUx18uWi PJHuJIPgdkkl6MgCY4QokgPH1bi6K/P5DxUl4CHZAgESFCLH6VgZ2iIv9wO6CTAVIxuFu1c3J2ECm k8v682rmQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOwMg-0007LY-Ni; Sun, 04 Oct 2020 05:15:18 +0000 Received: from mail-pf1-f194.google.com ([209.85.210.194]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOwMN-0007GD-6i for linux-arm-kernel@lists.infradead.org; Sun, 04 Oct 2020 05:15:00 +0000 Received: by mail-pf1-f194.google.com with SMTP id d6so4306358pfn.9 for ; Sat, 03 Oct 2020 22:14:58 -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=l0sL7ADN3Hq+42GWHoUqJqayEjL3b9dF3MMfLH2Y9NQ=; b=q5HcA+1N6CcLCw3M5CHDvEp4wLfsFT7FlL/Lq8F0BQxiSCAqMWk71t3VvMi5Eyqd0f Y1Jsame7jYqDa124C3cW03y3rmXpNl0BCyb1e0F6WVL1fVX6sLDfD4b7hZ7zNU7YWfan 3ouXqEX3Mc4hgcKG23dEupa6h0f+7R6RASvmPDq0hOac6AkmfS6kMFw6h6JFFlnq9BIx 2Oq/hTY0QMvqbM6Olz11jOeowjTYy5Flscl2Xa1/x76OkE3+4AyPyiPM6A14x0TrAx5G b8WsvodbQWDnPURvV2UOWJPcQFv6QfUD4iLN9IyDe2JbvUPNP/5B5VqQ3HmTCUxKKCuU WGfw== X-Gm-Message-State: AOAM532JrxVMyB5ktalkhCdGfRr8zxDNNkza132IxwdLyyYMASZfIJMs TRSyof/znwWnvQb0r+e8xM1iUD4fRis= X-Google-Smtp-Source: ABdhPJzFayjCJtOlCCDp1euNS+8aBlvXNaFrFBJ5JLikW0r8Gujg+MhK1dPOtDj2wkEnQuwZAH6iVA== X-Received: by 2002:a63:1958:: with SMTP id 24mr8687000pgz.326.1601788498162; Sat, 03 Oct 2020 22:14:58 -0700 (PDT) Received: from localhost ([2601:647:5b00:1161:a4cc:eef9:fbc0:2781]) by smtp.gmail.com with ESMTPSA id x6sm6145100pjp.25.2020.10.03.22.14.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Oct 2020 22:14:57 -0700 (PDT) From: Moritz Fischer To: linux-fpga@vger.kernel.org Subject: [PATCH 09/10] fpga: fpga-mgr: zynqmp: Simplify registration Date: Sat, 3 Oct 2020 22:14:22 -0700 Message-Id: <20201004051423.75879-10-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_011459_266761_E34D3F43 X-CRM114-Status: GOOD ( 15.27 ) 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.194 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.210.194 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.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.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/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 Sun Oct 4 05:14:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Moritz Fischer X-Patchwork-Id: 11815527 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 22A7A139A for ; Sun, 4 Oct 2020 05:15:38 +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 E63182068E for ; Sun, 4 Oct 2020 05:15:37 +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/IHccT1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E63182068E 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=21NatekhklS0NiJubNtDlpmWVYHcPwSFYisXe7QIRro=; b=t/IHccT1m+aeWHbCPOF4Moi5l A0Jm4PmmsWMSYUm8/GFyewH0fhht0TmOXiKyY49VmTpA1MVzXeGvO5Reb5L7WDbZ8H8d+NA84st5p hBmGX4umDR2paHWszzhz5eg2kCETXqlx57cX9zZzTKcERW4YjBX2gfEs/qHteTyAe1x3DjhzT+A7e Pn8X36aJwUMbO2zUbUEOgrNjHO0nfomp7Ba15JAzYw9eokIv7gJPye4lpetJxAL63HuaLFKy2+bgJ WCVc1yEpZc++ITKrDyizsHfhncrJJjSQcd4JpwRnU7mJXg7P5ZTgenGiGwZ4JrCuUMTrKPcA5zUwT 15W3Z2w5g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOwMj-0007MF-4R; Sun, 04 Oct 2020 05:15:21 +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 1kOwMO-0007Gu-IQ for linux-arm-kernel@lists.infradead.org; Sun, 04 Oct 2020 05:15:02 +0000 Received: by mail-pg1-f195.google.com with SMTP id 34so3593535pgo.13 for ; Sat, 03 Oct 2020 22:15:00 -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=KEIkOfJmCkr+mhT8bgXa4RUyoZrWLuARarkprMlR8hc=; b=jmfGvR6y4D+Hrhr+X/6D3lv2Z7DxcM8vxI5Ue/JWws/m1+mQCajbkYDaJsLGmIoNzl TLwcP0P3RWvRvRdFUuaNVmItC+90p4NaqAgIO+SJP+1/n9Mw3rI46T26+BnjbMUDc9Ka jSFeqPOIkMKwyIw4Ub5rh62iS0sKFI0Q3xK5YztrLQMoR1FdW9wtqh+xbQE0aht1NG9m rOhaFUnfq7Ej3Fxj/hh6oV+GvyjMO5skck8UpE3n4vqMfULywGVKWEbQ9UhcBBbMw7IF bcKVgZ45S6mKiSSGawljCVDPD2wsZGF5MTvd03MfHvvieIStdnrBAV+K9Po25NmoXB6D 46Mg== X-Gm-Message-State: AOAM5324O/R6ez58LhYDXMyhOtTUyUe8+34WO3u9lHynOGmI0ORt+QSu wY/ACMC0mpXgRx3qPGbL7zI= X-Google-Smtp-Source: ABdhPJxBFvc18Vo2CntFUWWe0qTHBP6EsWSvDe3RC70HKzn/p+q5e49ivi4n+Rtv76OD8E2enCUyiQ== X-Received: by 2002:a62:2581:0:b029:13f:ba38:b113 with SMTP id l123-20020a6225810000b029013fba38b113mr10296040pfl.15.1601788499350; Sat, 03 Oct 2020 22:14:59 -0700 (PDT) Received: from localhost ([2601:647:5b00:1161:a4cc:eef9:fbc0:2781]) by smtp.gmail.com with ESMTPSA id q15sm6177964pjp.26.2020.10.03.22.14.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Oct 2020 22:14:58 -0700 (PDT) From: Moritz Fischer To: linux-fpga@vger.kernel.org Subject: [PATCH 10/10] fpga: fpga-mgr: altera-pr-ip: Simplify registration Date: Sat, 3 Oct 2020 22:14:23 -0700 Message-Id: <20201004051423.75879-11-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_011500_963772_D92C5B08 X-CRM114-Status: GOOD ( 18.12 ) 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.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.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. Remove the now obsolete altera_pr_unregister() function. Signed-off-by: Moritz Fischer --- We should take another look at this, IIRC correctly the point of splitting this up into a separate driver was to make it useable by a different (pci?) driver later on. It doesn't seem like this happened, and I think we should just make this a platform driver? --- drivers/fpga/altera-pr-ip-core-plat.c | 10 ---------- drivers/fpga/altera-pr-ip-core.c | 14 +------------- include/linux/fpga/altera-pr-ip-core.h | 1 - 3 files changed, 1 insertion(+), 24 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..dfdf21ed34c4 100644 --- a/drivers/fpga/altera-pr-ip-core.c +++ b/drivers/fpga/altera-pr-ip-core.c @@ -195,22 +195,10 @@ 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); -void alt_pr_unregister(struct device *dev) -{ - struct fpga_manager *mgr = dev_get_drvdata(dev); - - dev_dbg(dev, "%s\n", __func__); - - fpga_mgr_unregister(mgr); -} -EXPORT_SYMBOL_GPL(alt_pr_unregister); - MODULE_AUTHOR("Matthew Gerlach "); MODULE_DESCRIPTION("Altera Partial Reconfiguration IP Core"); MODULE_LICENSE("GPL v2"); diff --git a/include/linux/fpga/altera-pr-ip-core.h b/include/linux/fpga/altera-pr-ip-core.h index 0b08ac20ab16..a6b4c07858cc 100644 --- a/include/linux/fpga/altera-pr-ip-core.h +++ b/include/linux/fpga/altera-pr-ip-core.h @@ -13,6 +13,5 @@ #include int alt_pr_register(struct device *dev, void __iomem *reg_base); -void alt_pr_unregister(struct device *dev); #endif /* _ALT_PR_IP_CORE_H */