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: Auger Eric X-Patchwork-Id: 55672 Delivered-To: patches@linaro.org Received: by 10.112.61.134 with SMTP id p6csp106292lbr; Wed, 28 Oct 2015 06:03:01 -0700 (PDT) X-Received: by 10.180.37.201 with SMTP id a9mr2903664wik.70.1446037375916; Wed, 28 Oct 2015 06:02:55 -0700 (PDT) Return-Path: Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com. [2a00:1450:400c:c05::229]) by mx.google.com with ESMTPS id l4si56162185wjx.32.2015.10.28.06.02.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Oct 2015 06:02:55 -0700 (PDT) Received-SPF: pass (google.com: domain of eric.auger@linaro.org designates 2a00:1450:400c:c05::229 as permitted sender) client-ip=2a00:1450:400c:c05::229; Authentication-Results: mx.google.com; spf=pass (google.com: domain of eric.auger@linaro.org designates 2a00:1450:400c:c05::229 as permitted sender) smtp.mailfrom=eric.auger@linaro.org; dkim=pass header.i=@linaro_org.20150623.gappssmtp.com Received: by wicfv8 with SMTP id fv8so11828400wic.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=lTk2WHgcNfap+xwmlGEiF0D/msQHLkMCqdSuH96I/aXNHRU3sSbZODrv29CKPig/jV 1i9acgayew/L6ntxaO1vGjxMyiUcMrU+AuBFUJrMLOyBwCOo0NU6ZwtsPC2p+7xvqCnt YQ9PfhPqJLdLIUVIK00WxZdCKck9+9fvIONPDPlX/s70q9gBDtsbz6ZRXcR904FbChFl 65iTVck86MRQpxKdIZ0HljmfqjnfJhLcLq9dYYaP7IWYz0UBHRfH4AAnVFJZPvME8uEe Z1cIXjmHDcu59jNiPtPRmROgcLoHmCzDxAOfxFBOQD0LjZxG59mRO3Jg960VCvr27+Jz dYNA== X-Gm-Message-State: ALoCoQnKdPhjP+/X9ElLT/tr3pP8kidIhX1Yr+7i9cNyPSfBFgt9ZP7Yd7eeFXbu9BodGjx9wBa4 X-Received: by 10.194.243.102 with SMTP id wx6mr52375134wjc.68.1446037375570; Wed, 28 Oct 2015 06:02:55 -0700 (PDT) Return-Path: 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 Cc: christoffer.dall@linaro.org, linux-kernel@vger.kernel.org, patches@linaro.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> 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(-) -- 1.9.1 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);