mirror of
https://git.proxmox.com/git/fwupd
synced 2025-06-28 04:28:38 +00:00
flashrom: Do not add GUID manually
It's just not requried; fu_device_add_instance_id() does this at the right time.
This commit is contained in:
parent
378aceae7d
commit
4a156deee2
@ -13,7 +13,6 @@
|
|||||||
|
|
||||||
#define I2C_PATH_REGEX "/i2c-([0-9]+)/"
|
#define I2C_PATH_REGEX "/i2c-([0-9]+)/"
|
||||||
#define HID_LENGTH 8
|
#define HID_LENGTH 8
|
||||||
#define DEVICE_GUID_FORMAT "FLASHROM-LSPCON-I2C-SPI\\VEN_%s&DEV_%s"
|
|
||||||
|
|
||||||
struct _FuFlashromLspconI2cSpiDevice {
|
struct _FuFlashromLspconI2cSpiDevice {
|
||||||
FuFlashromDevice parent_instance;
|
FuFlashromDevice parent_instance;
|
||||||
@ -165,8 +164,7 @@ fu_flashrom_lspcon_i2c_spi_device_setup (FuDevice *device, GError **error)
|
|||||||
g_autofree gchar *vid = NULL;
|
g_autofree gchar *vid = NULL;
|
||||||
g_autofree gchar *pid = NULL;
|
g_autofree gchar *pid = NULL;
|
||||||
g_autofree gchar *vendor_id = NULL;
|
g_autofree gchar *vendor_id = NULL;
|
||||||
g_autofree gchar *temp = NULL;
|
g_autofree gchar *instance_id = NULL;
|
||||||
g_autofree gchar *guid = NULL;
|
|
||||||
|
|
||||||
hw_id = fu_udev_device_get_sysfs_attr (FU_UDEV_DEVICE (device), "name", error);
|
hw_id = fu_udev_device_get_sysfs_attr (FU_UDEV_DEVICE (device), "name", error);
|
||||||
if (hw_id == NULL) {
|
if (hw_id == NULL) {
|
||||||
@ -181,10 +179,8 @@ fu_flashrom_lspcon_i2c_spi_device_setup (FuDevice *device, GError **error)
|
|||||||
vendor_id = g_strdup_printf ("I2C:%s", vid);
|
vendor_id = g_strdup_printf ("I2C:%s", vid);
|
||||||
fu_device_add_vendor_id (device, vendor_id);
|
fu_device_add_vendor_id (device, vendor_id);
|
||||||
|
|
||||||
temp = g_strdup_printf (DEVICE_GUID_FORMAT, vid, pid);
|
instance_id = g_strdup_printf ("FLASHROM-LSPCON-I2C-SPI\\VEN_%s&DEV_%s", vid, pid);
|
||||||
fu_device_add_instance_id (device, temp);
|
fu_device_add_instance_id (device, instance_id);
|
||||||
guid = fwupd_guid_hash_string (temp);
|
|
||||||
fu_device_add_guid (device, guid);
|
|
||||||
|
|
||||||
return fu_flashrom_lspcon_i2c_spi_device_set_version (device, error);
|
return fu_flashrom_lspcon_i2c_spi_device_set_version (device, error);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user