mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-05 04:40:13 +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 */
|
||||
if (id >> 8 == 0x85) {
|
||||
dev = g_object_new (FU_TYPE_SUPERIO_IT85_DEVICE,
|
||||
"device-file", "/dev/port",
|
||||
"chipset", chipset,
|
||||
"id", id,
|
||||
"port", port,
|
||||
NULL);
|
||||
} else if (id >> 8 == 0x89) {
|
||||
dev = g_object_new (FU_TYPE_SUPERIO_IT89_DEVICE,
|
||||
"device-file", "/dev/port",
|
||||
"chipset", chipset,
|
||||
"id", id,
|
||||
"port", port,
|
||||
|
@ -20,7 +20,7 @@ typedef struct
|
||||
guint16 id;
|
||||
} 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))
|
||||
|
||||
|
@ -9,11 +9,11 @@
|
||||
#include "fu-plugin.h"
|
||||
|
||||
#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
|
||||
{
|
||||
FuDeviceClass parent_class;
|
||||
FuUdevDeviceClass parent_class;
|
||||
gboolean (*setup) (FuSuperioDevice *self,
|
||||
GError **error);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user