mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-04 00:53:40 +00:00
altos: Use the new FuDevice:probe vfunc
This commit is contained in:
parent
c0fe556350
commit
54879c6b9a
@ -662,9 +662,10 @@ fu_altos_device_probe_bootloader (FuAltosDevice *self, GError **error)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
fu_altos_device_probe (FuAltosDevice *self, GError **error)
|
||||
static gboolean
|
||||
fu_altos_device_probe (FuDevice *device, GError **error)
|
||||
{
|
||||
FuAltosDevice *self = FU_ALTOS_DEVICE (device);
|
||||
GUsbDevice *usb_device = fu_usb_device_get_dev (FU_USB_DEVICE (self));
|
||||
|
||||
/* bootloader uses tty */
|
||||
@ -749,6 +750,7 @@ fu_altos_device_class_init (FuAltosDeviceClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
FuDeviceClass *klass_device = FU_DEVICE_CLASS (klass);
|
||||
klass_device->probe = fu_altos_device_probe;
|
||||
klass_device->write_firmware = fu_altos_device_write_firmware;
|
||||
klass_device->read_firmware = fu_altos_device_read_firmware;
|
||||
object_class->finalize = fu_altos_device_finalize;
|
||||
|
@ -36,8 +36,6 @@ FuAltosDevice *fu_altos_device_new (GUsbDevice *usb_device);
|
||||
FuAltosDeviceKind fu_altos_device_kind_from_string (const gchar *kind);
|
||||
const gchar *fu_altos_device_kind_to_string (FuAltosDeviceKind kind);
|
||||
FuAltosDeviceKind fu_altos_device_get_kind (FuAltosDevice *device);
|
||||
gboolean fu_altos_device_probe (FuAltosDevice *device,
|
||||
GError **error);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@ -30,7 +30,7 @@ fu_plugin_usb_device_added (FuPlugin *plugin, GUsbDevice *usb_device, GError **e
|
||||
return TRUE;
|
||||
|
||||
/* get device properties */
|
||||
if (!fu_altos_device_probe (dev, error))
|
||||
if (!fu_device_probe (FU_DEVICE (dev), error))
|
||||
return FALSE;
|
||||
|
||||
/* only the bootloader can do the update */
|
||||
|
Loading…
Reference in New Issue
Block a user