mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-07 06:48:44 +00:00
superio: Fix regression when coldplugging superio devices
Fixes https://github.com/fwupd/fwupd/issues/1546
This commit is contained in:
parent
ab902c0dd9
commit
025fc77d7a
@ -45,12 +45,14 @@ fu_plugin_superio_coldplug_chipset (FuPlugin *plugin, const gchar *chipset, GErr
|
|||||||
/* create IT89xx or IT89xx */
|
/* create IT89xx or IT89xx */
|
||||||
if (id >> 8 == 0x85) {
|
if (id >> 8 == 0x85) {
|
||||||
dev = g_object_new (FU_TYPE_SUPERIO_IT85_DEVICE,
|
dev = g_object_new (FU_TYPE_SUPERIO_IT85_DEVICE,
|
||||||
|
"device-file", "/dev/port",
|
||||||
"chipset", chipset,
|
"chipset", chipset,
|
||||||
"id", id,
|
"id", id,
|
||||||
"port", port,
|
"port", port,
|
||||||
NULL);
|
NULL);
|
||||||
} else if (id >> 8 == 0x89) {
|
} else if (id >> 8 == 0x89) {
|
||||||
dev = g_object_new (FU_TYPE_SUPERIO_IT89_DEVICE,
|
dev = g_object_new (FU_TYPE_SUPERIO_IT89_DEVICE,
|
||||||
|
"device-file", "/dev/port",
|
||||||
"chipset", chipset,
|
"chipset", chipset,
|
||||||
"id", id,
|
"id", id,
|
||||||
"port", port,
|
"port", port,
|
||||||
|
@ -20,7 +20,7 @@ typedef struct
|
|||||||
guint16 id;
|
guint16 id;
|
||||||
} FuSuperioDevicePrivate;
|
} FuSuperioDevicePrivate;
|
||||||
|
|
||||||
G_DEFINE_TYPE_WITH_PRIVATE (FuSuperioDevice, fu_superio_device, FU_TYPE_DEVICE)
|
G_DEFINE_TYPE_WITH_PRIVATE (FuSuperioDevice, fu_superio_device, FU_TYPE_UDEV_DEVICE)
|
||||||
|
|
||||||
#define GET_PRIVATE(o) (fu_superio_device_get_instance_private (o))
|
#define GET_PRIVATE(o) (fu_superio_device_get_instance_private (o))
|
||||||
|
|
||||||
|
@ -9,11 +9,11 @@
|
|||||||
#include "fu-plugin.h"
|
#include "fu-plugin.h"
|
||||||
|
|
||||||
#define FU_TYPE_SUPERIO_DEVICE (fu_superio_device_get_type ())
|
#define FU_TYPE_SUPERIO_DEVICE (fu_superio_device_get_type ())
|
||||||
G_DECLARE_DERIVABLE_TYPE (FuSuperioDevice, fu_superio_device, FU, SUPERIO_DEVICE, FuDevice)
|
G_DECLARE_DERIVABLE_TYPE (FuSuperioDevice, fu_superio_device, FU, SUPERIO_DEVICE, FuUdevDevice)
|
||||||
|
|
||||||
struct _FuSuperioDeviceClass
|
struct _FuSuperioDeviceClass
|
||||||
{
|
{
|
||||||
FuDeviceClass parent_class;
|
FuUdevDeviceClass parent_class;
|
||||||
gboolean (*setup) (FuSuperioDevice *self,
|
gboolean (*setup) (FuSuperioDevice *self,
|
||||||
GError **error);
|
GError **error);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user