summaryrefslogtreecommitdiff
path: root/drivers/vfio/platform/vfio_platform_private.h
diff options
context:
space:
mode:
authorEric Auger <eric.auger@linaro.org>2015-11-03 18:12:17 +0000
committerAlex Williamson <alex.williamson@redhat.com>2015-11-03 12:55:03 -0700
commite9e0506ee60dd79714c59457f4301c602786defc (patch)
tree2f155d28505742ce7af5bd843d4e71c7ca9e4eba /drivers/vfio/platform/vfio_platform_private.h
parent0628c4dfd3a781c09aed983cc79b3c43c5c568bd (diff)
vfio: platform: use list of registered reset function
Remove the static lookup table and use the dynamic list of registered reset functions instead. Also load the reset module through its alias. The reset struct module pointer is stored in vfio_platform_device. We also remove the useless struct device pointer parameter in vfio_platform_get_reset. This patch fixes the issue related to the usage of __symbol_get, which besides from being moot, prevented compilation with CONFIG_MODULES disabled. Also usage of MODULE_ALIAS makes possible to add a new reset module without needing to update the framework. This was suggested by Arnd. Signed-off-by: Eric Auger <eric.auger@linaro.org> Reported-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/vfio/platform/vfio_platform_private.h')
-rw-r--r--drivers/vfio/platform/vfio_platform_private.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/vfio/platform/vfio_platform_private.h b/drivers/vfio/platform/vfio_platform_private.h
index 415310f62b06..d1b0668fe394 100644
--- a/drivers/vfio/platform/vfio_platform_private.h
+++ b/drivers/vfio/platform/vfio_platform_private.h
@@ -58,6 +58,7 @@ struct vfio_platform_device {
struct mutex igate;
struct module *parent_module;
const char *compat;
+ struct module *reset_module;
/*
* These fields should be filled by the bus specific binder
@@ -81,12 +82,6 @@ struct vfio_platform_reset_node {
vfio_platform_reset_fn_t reset;
};
-struct vfio_platform_reset_combo {
- const char *compat;
- const char *reset_function_name;
- const char *module_name;
-};
-
extern int vfio_platform_probe_common(struct vfio_platform_device *vdev,
struct device *dev);
extern struct vfio_platform_device *vfio_platform_remove_common