Message ID | 20210625195148.837230-8-trix@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=wsnO=LT=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@kernel.org> 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=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 61897C2B9F4 for <linux-arm-kernel@archiver.kernel.org>; Fri, 25 Jun 2021 19:55:20 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 34B6C61445 for <linux-arm-kernel@archiver.kernel.org>; Fri, 25 Jun 2021 19:55:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 34B6C61445 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com 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=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1eBdnRqagISyZLQnr0sbuTmfD2oNANITj/vEpLkqNbE=; b=gmP9rkPABRQ48X 9gy4wOVS4Bs/bpgk0bbE5VJfOKo84CF83J9aIZ6hZVMa4Unwxp3jZLXvfleQoAGf8G/wSV3qLE7J/ 75JkP7sp0wuqZ1oeUMNr9Hr1ASnr7KU+WYC49iL/X0L7Wmbxd79v2SGwdhgYUP6v6WuyoPEWCpNbL 79L9WHyhIRIRJ+FpOvxgjrDEnbttn++X4mR0+OrCfnNWrhLlGTfmI88vomWg4w+WysWZUHDAqPgY6 1+WBos+QACadccera68bQ0gNHtqYKu66YcJfaS3Y2kd4aMUjE0By4UxfCpi5cD6PloM0pO4eZFcXR iymoeeg4fLR7BXeEkA5A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lwrtC-002iov-Pd; Fri, 25 Jun 2021 19:53:23 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lwrsE-002iXz-TV for linux-arm-kernel@lists.infradead.org; Fri, 25 Jun 2021 19:52:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624650742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LjAdCEfiqEm9c0Ynsebg4BWNbSDpcr72TwU3P0oRZpc=; b=A/UepZYKvirfToFz8Zmv6ZS9proH4NIh3q4cN9VOxe8Z1aStzjmUh7fvOxB3SJeLsOHJV/ eS2EAWUUww4pQwwkU5NzU3qhVeqU3DOA6VJPVFqK4OX+3DINM3iozI2OV1GfVMyZoSCMso sdhsXGTN4hKbnUZA0yTgS+HJpC9+V+0= Received: from mail-oi1-f197.google.com (mail-oi1-f197.google.com [209.85.167.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-202-BoVgkR0ANfKKCeKpdBNo-Q-1; Fri, 25 Jun 2021 15:52:18 -0400 X-MC-Unique: BoVgkR0ANfKKCeKpdBNo-Q-1 Received: by mail-oi1-f197.google.com with SMTP id w125-20020acac6830000b029021ecc100d7bso6557193oif.6 for <linux-arm-kernel@lists.infradead.org>; Fri, 25 Jun 2021 12:52:17 -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=LjAdCEfiqEm9c0Ynsebg4BWNbSDpcr72TwU3P0oRZpc=; b=mj01OXOwxd0JtG1cncC8/dX3HzOuR900l3YxrogKRBtOc02ZwAlUYhc4jQRpFvucWx yQuduRwxGytD89jRcFaCiXJ8KdzAe9TUasQUwLH8MnUsb6kLcBk+KE8gT7IRNniD4NfL 72sAnWksLZ4CoDH66C1FpOeOaYuVATUqYgBRq9OBHM7H4BQMbF1CsZpkryToJfLd+myX /Ee9jNaSBO5kNmeP/6F8wXXIfRgw7j/zTHDTvi39U9TFuihuGd0LCCalEt1yAyKCLI/L Zvb6kBT/xWcVyTUUzZZq0WhwfuQlLBa2iFl04Hax4rv7RbIjRuL+qEiFdg3l3yNDBaAX 9EtQ== X-Gm-Message-State: AOAM532zf8gw+UGT3Nl6WcJ4EoV3FeoDLrSNCMfw8r9Bq4gNsvVycqhM 2fomFIEx7pi4M0fWk3c1QTb/CuLJTkX7kDMKkPR5bSkiSOEjf865jY2fGMH7Brtzaf+PJE1z0oO NZbVsNKzWkKsnhO7X2SpReST9f2FZsZOpomw= X-Received: by 2002:aca:e107:: with SMTP id y7mr12990070oig.11.1624650737409; Fri, 25 Jun 2021 12:52:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwF1c4CKnAxDSoTM1uv3ouUh/l8z5JnAQLTGazp+4FQ/B0la7C6C13aQqkvGpjE5+63AdBssw== X-Received: by 2002:aca:e107:: with SMTP id y7mr12990063oig.11.1624650737263; Fri, 25 Jun 2021 12:52:17 -0700 (PDT) Received: from localhost.localdomain.com (075-142-250-213.res.spectrum.com. [75.142.250.213]) by smtp.gmail.com with ESMTPSA id o25sm1535446ood.20.2021.06.25.12.52.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Jun 2021 12:52:17 -0700 (PDT) From: trix@redhat.com To: hao.wu@intel.com, mdf@kernel.org, michal.simek@xilinx.com Cc: linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tom Rix <trix@redhat.com> Subject: [PATCH v4 6/7] fpga-mgr: wrap the fpga_remove() op Date: Fri, 25 Jun 2021 12:51:47 -0700 Message-Id: <20210625195148.837230-8-trix@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210625195148.837230-1-trix@redhat.com> References: <20210625195148.837230-1-trix@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=trix@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210625_125223_082084_D29916F6 X-CRM114-Status: GOOD ( 11.95 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
wrappers for fpga_manager_ops
|
expand
|
diff --git a/drivers/fpga/fpga-mgr.c b/drivers/fpga/fpga-mgr.c index b3380ad341d22..077c0f9edbe4c 100644 --- a/drivers/fpga/fpga-mgr.c +++ b/drivers/fpga/fpga-mgr.c @@ -25,6 +25,12 @@ struct fpga_mgr_devres { struct fpga_manager *mgr; }; +static inline void fpga_mgr_fpga_remove(struct fpga_manager *mgr) +{ + if (mgr->mops->fpga_remove) + mgr->mops->fpga_remove(mgr); +} + static inline enum fpga_mgr_states fpga_mgr_state(struct fpga_manager *mgr) { if (mgr->mops->state) @@ -745,8 +751,7 @@ void fpga_mgr_unregister(struct fpga_manager *mgr) * If the low level driver provides a method for putting fpga into * a desired state upon unregister, do it. */ - if (mgr->mops->fpga_remove) - mgr->mops->fpga_remove(mgr); + fpga_mgr_fpga_remove(mgr); device_unregister(&mgr->dev); }