diff options
| -rw-r--r-- | drivers/vfio/platform/vfio_platform_private.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/vfio/platform/vfio_platform_private.h b/drivers/vfio/platform/vfio_platform_private.h index c563940e0f6b..fd262be2a443 100644 --- a/drivers/vfio/platform/vfio_platform_private.h +++ b/drivers/vfio/platform/vfio_platform_private.h | |||
| @@ -110,4 +110,18 @@ static struct vfio_platform_reset_node __reset ## _node = { \ | |||
| 110 | }; \ | 110 | }; \ |
| 111 | __vfio_platform_register_reset(&__reset ## _node) | 111 | __vfio_platform_register_reset(&__reset ## _node) |
| 112 | 112 | ||
| 113 | #define module_vfio_reset_handler(compat, reset) \ | ||
| 114 | MODULE_ALIAS("vfio-reset:" compat); \ | ||
| 115 | static int __init reset ## _module_init(void) \ | ||
| 116 | { \ | ||
| 117 | vfio_platform_register_reset(compat, reset); \ | ||
| 118 | return 0; \ | ||
| 119 | }; \ | ||
| 120 | static void __exit reset ## _module_exit(void) \ | ||
| 121 | { \ | ||
| 122 | vfio_platform_unregister_reset(compat, reset); \ | ||
| 123 | }; \ | ||
| 124 | module_init(reset ## _module_init); \ | ||
| 125 | module_exit(reset ## _module_exit) | ||
| 126 | |||
| 113 | #endif /* VFIO_PLATFORM_PRIVATE_H */ | 127 | #endif /* VFIO_PLATFORM_PRIVATE_H */ |
