From patchwork Fri Oct 23 15:47:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Auger Eric X-Patchwork-Id: 55497 Delivered-To: patches@linaro.org Received: by 10.55.75.214 with SMTP id y205csp1169951qka; Fri, 23 Oct 2015 08:48:37 -0700 (PDT) X-Received: by 10.195.11.98 with SMTP id eh2mr4505957wjd.59.1445615258791; Fri, 23 Oct 2015 08:47:38 -0700 (PDT) Return-Path: Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com. [209.85.212.179]) by mx.google.com with ESMTPS id mz3si5740764wic.90.2015.10.23.08.47.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Oct 2015 08:47:38 -0700 (PDT) Received-SPF: pass (google.com: domain of eric.auger@linaro.org designates 209.85.212.179 as permitted sender) client-ip=209.85.212.179; Authentication-Results: mx.google.com; spf=pass (google.com: domain of eric.auger@linaro.org designates 209.85.212.179 as permitted sender) smtp.mailfrom=eric.auger@linaro.org Received: by wicfv8 with SMTP id fv8so37831941wic.0 for ; Fri, 23 Oct 2015 08:47:38 -0700 (PDT) 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=cXliqazfWkPY8msT7vvB+nSPSDHNfNypN5fBf570A4qczaGXSlzTpovb+LYIAYNvLC lubWe+yfQXDihETtv1O7XQEIDW77nrLDXhBRQNCfUqmD+ZGwzUM7E/TUSu8MFwnWOkzP TRiecrkKnTgIUdLs0cWD9fPGKKUTgQU4mclz/GicG1OlZlBoVoIGFALDxk7hp6A+BwiV tcXTDt7pkIPpfKRnguezg9q9/WxZSjfscMpE1c8nNFpIKqNQvBjpg1ckyuSWMFB1ugJB JcReD8+zfhPNi/Kxv1qjGLso21SrMslVI5t8ZBzkFCPu2ruBJ5fBqRsS0A8barvIJQs7 JKPQ== X-Gm-Message-State: ALoCoQn4TptPfw4GUj2H201uo+KorprQuzgKZqLnBiUcRNh4jas9zXW2J8/B+p4zHJ/FUMJ93QuJ X-Received: by 10.180.188.130 with SMTP id ga2mr5051850wic.93.1445615258580; Fri, 23 Oct 2015 08:47:38 -0700 (PDT) Return-Path: Received: from gnx2579.home (LMontsouris-657-1-37-90.w80-11.abo.wanadoo.fr. [80.11.198.90]) by smtp.gmail.com with ESMTPSA id i3sm3388471wij.9.2015.10.23.08.47.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Oct 2015 08:47:37 -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 v4 4/7] vfio: platform: reset: calxedaxgmac: add reset function registration Date: Fri, 23 Oct 2015 17:47:22 +0200 Message-Id: <1445615245-31124-5-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1445615245-31124-1-git-send-email-eric.auger@linaro.org> References: <1445615245-31124-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);