From 39c4436c3d069b2b075690cd5ef40f6459fa2044 Mon Sep 17 00:00:00 2001 From: Mario Limonciello Date: Thu, 21 Sep 2017 06:23:24 +0800 Subject: [PATCH] trivial: dell: move fu_dell_supported into plugin Eventually fu-dell-common will not be used by synaptics, and it's already not using this function. --- plugins/dell/fu-dell-common.c | 19 ------------------- plugins/dell/fu-dell-common.h | 4 ---- plugins/dell/fu-plugin-dell.c | 18 ++++++++++++++++++ 3 files changed, 18 insertions(+), 23 deletions(-) diff --git a/plugins/dell/fu-dell-common.c b/plugins/dell/fu-dell-common.c index c153fc0f2..66d6932e1 100644 --- a/plugins/dell/fu-dell-common.c +++ b/plugins/dell/fu-dell-common.c @@ -58,24 +58,6 @@ _dell_smi_obj_free (FuDellSmiObj *obj) G_DEFINE_AUTOPTR_CLEANUP_FUNC (FuDellSmiObj, _dell_smi_obj_free); -gboolean -fu_dell_supported (FuPlugin *plugin) -{ - GBytes *de_table = NULL; - const guint8 *value; - gsize len; - - de_table = fu_plugin_get_smbios_data (plugin, 0xDE); - if (de_table == NULL) - return FALSE; - value = g_bytes_get_data (de_table, &len); - if (len == 0) - return FALSE; - if (*value != 0xDE) - return FALSE; - return TRUE; -} - /* don't actually clear if we're testing */ gboolean fu_dell_clear_smi (FuDellSmiObj *obj) @@ -90,7 +72,6 @@ fu_dell_clear_smi (FuDellSmiObj *obj) return TRUE; } - gboolean fu_dell_execute_smi (FuDellSmiObj *obj) { diff --git a/plugins/dell/fu-dell-common.h b/plugins/dell/fu-dell-common.h index 4b9c261ae..dae37fe7d 100644 --- a/plugins/dell/fu-dell-common.h +++ b/plugins/dell/fu-dell-common.h @@ -22,7 +22,6 @@ #ifndef __FU_DELL_COMMON_H #define __FU_DELL_COMMON_H -#include "fu-plugin.h" #include "fu-device.h" #include #include @@ -87,9 +86,6 @@ typedef enum _CABLE_TYPE CABLE_TYPE_TBT } CABLE_TYPE; -gboolean -fu_dell_supported (FuPlugin *plugin); - gboolean fu_dell_clear_smi (FuDellSmiObj *obj); diff --git a/plugins/dell/fu-plugin-dell.c b/plugins/dell/fu-plugin-dell.c index b77c54007..0b38eed83 100644 --- a/plugins/dell/fu-plugin-dell.c +++ b/plugins/dell/fu-plugin-dell.c @@ -111,6 +111,24 @@ _fwup_resource_iter_free (fwup_resource_iter *iter) G_DEFINE_AUTOPTR_CLEANUP_FUNC (fwup_resource_iter, _fwup_resource_iter_free); +static gboolean +fu_dell_supported (FuPlugin *plugin) +{ + GBytes *de_table = NULL; + const guint8 *value; + gsize len; + + de_table = fu_plugin_get_smbios_data (plugin, 0xDE); + if (de_table == NULL) + return FALSE; + value = g_bytes_get_data (de_table, &len); + if (len == 0) + return FALSE; + if (*value != 0xDE) + return FALSE; + return TRUE; +} + static gboolean fu_plugin_dell_match_dock_component (const gchar *query_str, efi_guid_t *guid_out,