dell: Fix possible linker problem

The linker does not know which public symbol to call if a plugin calls it's own
symbol. Without this change one plugin could call into another plugin with the
wrong GsPluginData set.
This commit is contained in:
Richard Hughes 2017-01-09 21:32:40 +00:00
parent 2b464378ea
commit efa55b83a7

View File

@ -1046,6 +1046,12 @@ fu_plugin_dell_toggle_flash (FuPlugin *plugin,
else else
g_debug("Dell: Toggled MST hub GPIO to %d", enable); g_debug("Dell: Toggled MST hub GPIO to %d", enable);
/* If succesful, add a delay to allow OS response to
settling the GPIO change. Without this, plugins
may not respond properly */
if (enable)
g_usleep(DELL_FLASH_MODE_DELAY * 1000000);
return TRUE; return TRUE;
} }
@ -1054,14 +1060,7 @@ fu_plugin_update_prepare (FuPlugin *plugin,
FuDevice *device, FuDevice *device,
GError **error) GError **error)
{ {
gboolean result; return fu_plugin_dell_toggle_flash (plugin, error, TRUE);
result = fu_plugin_dell_toggle_flash (plugin, error, TRUE);
/* If succesful, add a delay to allow OS response to
settling the GPIO change. Without this, plugins
may not respond properly */
if (result)
g_usleep(DELL_FLASH_MODE_DELAY * 1000000);
return result;
} }
gboolean gboolean
@ -1075,13 +1074,13 @@ fu_plugin_update_cleanup (FuPlugin *plugin,
gboolean gboolean
fu_plugin_coldplug_prepare (FuPlugin *plugin, GError **error) fu_plugin_coldplug_prepare (FuPlugin *plugin, GError **error)
{ {
return fu_plugin_update_prepare (plugin, NULL, error); return fu_plugin_dell_toggle_flash (plugin, error, TRUE);
} }
gboolean gboolean
fu_plugin_coldplug_cleanup (FuPlugin *plugin, GError **error) fu_plugin_coldplug_cleanup (FuPlugin *plugin, GError **error)
{ {
return fu_plugin_update_cleanup (plugin, NULL, error); return fu_plugin_dell_toggle_flash (plugin, error, FALSE);
} }
void void