From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5FA49C4727E for ; Sun, 4 Oct 2020 05:16:41 +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 0AD672067C for ; Sun, 4 Oct 2020 05:16:41 +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 0AD672067C 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+linux-arm-kernel=archiver.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-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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Simplify registration using new devm_fpga_mgr_register() API. 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), -- 2.28.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel