From patchwork Wed Oct 28 13:02:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Auger X-Patchwork-Id: 7510221 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4BCBFBEEA4 for ; Wed, 28 Oct 2015 13:05:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5B0192068D for ; Wed, 28 Oct 2015 13:05:22 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6197E2053B for ; Wed, 28 Oct 2015 13:05:21 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZrQOL-0006bv-DN; Wed, 28 Oct 2015 13:03:49 +0000 Received: from mail-wi0-x235.google.com ([2a00:1450:400c:c05::235]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZrQNn-0006Pt-LJ for linux-arm-kernel@lists.infradead.org; Wed, 28 Oct 2015 13:03:17 +0000 Received: by wicll6 with SMTP id ll6so197602091wic.0 for ; Wed, 28 Oct 2015 06:02:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro_org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=zbRPpzolvLhZ7g7oumpkXIWswe1z5oI3/jRsJKrFadU=; b=oDK/iU5Qn3toIjaEuNXPuP/tYzVPr27VYNHNtH4czncCYWEFQXpd8N9VCPIlMgeFkW m5NPwjGYf4V7qrgE/5yscmxTb1FiGK14E+w6xDySt+h2Beos1/fp4FNQ3eSL/CT7nliA KMNTSuFThSld5OFG8X2H4NQEaJhB8GAXpjWmmK28XJ1DlL3/73jyBx71lhVnd6U5oJsA NHuZMEcOLw1a5Gprqf5Qjy0DGgbd6OmGZb4/k6X3g0mvGTh8MejObNaQmpF3j9REofSR XZ6Kxoz0DN7g3l71RfL/yBm8WuL2PoUrtwU4PHJURaoRSMMYPs2GuUiOjfa5KpWBCTcA QlRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=zbRPpzolvLhZ7g7oumpkXIWswe1z5oI3/jRsJKrFadU=; b=OCS74UgWKix8tg9dQaPY6SxBLYfbKbEFMCGKhtf8aRmP/ZxqTX8qySScB3oT8imORh dKEuQJkZps8KTrnY6hc9Fec1+4pRQx8i5u84vr62f4hBwPRxnzVH24sTxN1VCm1gX0po 2Rc6DQtjE0rIzEd2Q0kTDQdnHVxdJbzGuPFt2RySwN70Sc6Hf298z3AUKvM4TWjbio/R t5ADROvVG/yS8/ShomgSNo5FWUBACD5YZDP20+X5d42RKXFVvLy4SZjqWdaHySBUVjSM Gy+KKpnkj2EhBwZaCdWZFTUA0ofqKbzVC/XH11mmHgVZwZFwyrMvfdm8JDecT6Azi0us /QHQ== X-Gm-Message-State: ALoCoQluX1HqpasjD9p89wpTaIg+7ZMjz524SSdyO0RY9jCdzAFLQFvdUgqo+zs1zUAkDfdo8t5F X-Received: by 10.194.243.102 with SMTP id wx6mr52375134wjc.68.1446037375570; Wed, 28 Oct 2015 06:02:55 -0700 (PDT) Received: from new-host-2.home (LMontsouris-657-1-37-90.w80-11.abo.wanadoo.fr. [80.11.198.90]) by smtp.gmail.com with ESMTPSA id gl9sm49894196wjb.10.2015.10.28.06.02.53 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 28 Oct 2015 06:02:54 -0700 (PDT) From: Eric Auger To: eric.auger@st.com, eric.auger@linaro.org, alex.williamson@redhat.com, b.reynal@virtualopensystems.com, arnd@arndb.de, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org Subject: [PATCH v5 4/7] vfio: platform: reset: calxedaxgmac: add reset function registration Date: Wed, 28 Oct 2015 13:02:35 +0000 Message-Id: <1446037358-2079-5-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1446037358-2079-1-git-send-email-eric.auger@linaro.org> References: <1446037358-2079-1-git-send-email-eric.auger@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151028_060315_942089_86FB33CA X-CRM114-Status: GOOD ( 14.55 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, christoffer.dall@linaro.org, patches@linaro.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds the reset function registration/unregistration. This is handled through the module_vfio_reset_handler macro. This latter also defines a MODULE_ALIAS which simplifies the load from vfio-platform. Signed-off-by: Eric Auger Reviewed-by: Arnd Bergmann --- v3 -> v4: - I restored the EXPORT_SYMBOL which will be removed when switching the lookup method - Add Arnd R-b. v2 -> v3: - do not include vfio_platform_reset_private.h anymore (removed) - remove pr_info - rework commit message v1 -> v2: - uses the module_vfio_reset_handler macro - add pr_info on vfio reset - do not export vfio_platform_calxedaxgmac_reset symbol anymore --- drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c b/drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c index 619dc7d..80718f2 100644 --- a/drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c +++ b/drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c @@ -30,8 +30,6 @@ #define DRIVER_AUTHOR "Eric Auger " #define DRIVER_DESC "Reset support for Calxeda xgmac vfio platform device" -#define CALXEDAXGMAC_COMPAT "calxeda,hb-xgmac" - /* XGMAC Register definitions */ #define XGMAC_CONTROL 0x00000000 /* MAC Configuration */ @@ -80,6 +78,8 @@ int vfio_platform_calxedaxgmac_reset(struct vfio_platform_device *vdev) } EXPORT_SYMBOL_GPL(vfio_platform_calxedaxgmac_reset); +module_vfio_reset_handler("calxeda,hb-xgmac", vfio_platform_calxedaxgmac_reset); + MODULE_VERSION(DRIVER_VERSION); MODULE_LICENSE("GPL v2"); MODULE_AUTHOR(DRIVER_AUTHOR);