mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-15 01:08:19 +00:00
Prefer to update the child first if the order is unspecified
This fixes updating VLI hardware where there are multiple 'tiers' of USB hubs.
This commit is contained in:
parent
4299ba0914
commit
d09f083e4a
@ -643,6 +643,13 @@ fu_device_set_parent (FuDevice *self, FuDevice *parent)
|
|||||||
|
|
||||||
g_return_if_fail (FU_IS_DEVICE (self));
|
g_return_if_fail (FU_IS_DEVICE (self));
|
||||||
|
|
||||||
|
/* if unspecified, always child before parent */
|
||||||
|
if (parent != NULL &&
|
||||||
|
fu_device_get_order (parent) == fu_device_get_order (self)) {
|
||||||
|
g_debug ("auto-setting %s order", fu_device_get_id (parent));
|
||||||
|
fu_device_set_order (parent, fu_device_get_order (self) + 1);
|
||||||
|
}
|
||||||
|
|
||||||
if (priv->parent != NULL)
|
if (priv->parent != NULL)
|
||||||
g_object_remove_weak_pointer (G_OBJECT (priv->parent), (gpointer *) &priv->parent);
|
g_object_remove_weak_pointer (G_OBJECT (priv->parent), (gpointer *) &priv->parent);
|
||||||
if (parent != NULL)
|
if (parent != NULL)
|
||||||
|
Loading…
Reference in New Issue
Block a user