Skip to content

Commit

Permalink
vfio: platform: reset: calxedaxgmac: add reset function registration
Browse files Browse the repository at this point in the history
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 <eric.auger@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
  • Loading branch information
Eric Auger authored and Alex Williamson committed Nov 3, 2015
1 parent 5886465 commit 680742f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
#define DRIVER_AUTHOR "Eric Auger <eric.auger@linaro.org>"
#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 */

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 680742f

Please sign in to comment.