From patchwork Tue Nov 3 18:12:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Auger X-Patchwork-Id: 7546241 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id ADE539F2F7 for ; Tue, 3 Nov 2015 18:15:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CED4D20717 for ; Tue, 3 Nov 2015 18:15:40 +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 F1CA420719 for ; Tue, 3 Nov 2015 18:15:39 +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 1Ztg5r-0005jH-84; Tue, 03 Nov 2015 18:14:03 +0000 Received: from mail-wi0-x22a.google.com ([2a00:1450:400c:c05::22a]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ztg4i-0004vi-1w for linux-arm-kernel@lists.infradead.org; Tue, 03 Nov 2015 18:12:57 +0000 Received: by wijp11 with SMTP id p11so77309755wij.0 for ; Tue, 03 Nov 2015 10:12:31 -0800 (PST) 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=jE6GhrFua2O/GmCN0o/cuMOOYnazNucN+uU1jJ5kNSdvq6Qc00gA0nIfAXTlNI9IH4 /+Z2PfbYiksfxeNnDpC5mHO/k1uQLF2OxqKpC46FpA7OkWhJp4O+IdzORCPep70kHrCG nIxfTtgJdq17pRq0uz+0QKZQJ8rvtOHbim90XVJNIcDeUleFIsiPHz9tdDA5kCE2Wtq9 Ua3tJN72ylWHoxe41Z1cZO0SOJCMCUABH83wVjVlHDcVQZpNfi7BvQQVUC2zalbKkg1a k2n7qGFPp6W1zwUK8ZsfcZ6eJysv3o29i77OiwivEycNN8TUDGrd6yyfM5vqX2Ajr011 WBoA== 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=kbXnyiaN8AnCQdTlVHebgLbZDXvP0ZOVql7aROI8EDiCapWxa8bcFxff7kixnrj7WQ bwKCC4qBBsk6mTIi3gn3mIZ92ifKWCYuf7up/el0CFGq3WwcBnY+00c/4aRvMLvZvf/R 5M8r8EVbyr3SMMduI2dXpq3Byz15M9lvaGwqhE09o8OF+FO0HlAGmOLlMtQpnmmHgam9 Y1pXI09NhkthExDRLUNhdKEdESN2FfmCaRr9uvdwC5eAWoNtv/HpwDaV5kHkqT2Y0nGV Cj2NMtPxaik/Q//t+7wkAmtAM+z74wzT4+Et0f0dkG+A3TNzWWOd4OtuQHCEqCv5eXF1 bLHQ== X-Gm-Message-State: ALoCoQkRS+D5ujBjEG3hR764r92Gw9nbhUyHmmMo8ZXZkCRJr6f86uRlXxEB/11sXg4hY+XJVrLo X-Received: by 10.194.89.98 with SMTP id bn2mr30636314wjb.55.1446574351749; Tue, 03 Nov 2015 10:12:31 -0800 (PST) Received: from new-host-3.home (LMontsouris-657-1-37-90.w80-11.abo.wanadoo.fr. [80.11.198.90]) by smtp.gmail.com with ESMTPSA id om1sm28830527wjc.2.2015.11.03.10.12.30 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 03 Nov 2015 10:12:30 -0800 (PST) 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 v6 4/8] vfio: platform: reset: calxedaxgmac: add reset function registration Date: Tue, 3 Nov 2015 18:12:15 +0000 Message-Id: <1446574339-1843-5-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1446574339-1843-1-git-send-email-eric.auger@linaro.org> References: <1446574339-1843-1-git-send-email-eric.auger@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151103_101252_623486_0D476488 X-CRM114-Status: GOOD ( 14.56 ) 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, T_DKIM_INVALID, T_RP_MATCHES_RCVD, 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);