mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-07 16:06:06 +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;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
static gboolean
|
||||||
fu_altos_device_probe (FuAltosDevice *self, GError **error)
|
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));
|
GUsbDevice *usb_device = fu_usb_device_get_dev (FU_USB_DEVICE (self));
|
||||||
|
|
||||||
/* bootloader uses tty */
|
/* bootloader uses tty */
|
||||||
@ -749,6 +750,7 @@ fu_altos_device_class_init (FuAltosDeviceClass *klass)
|
|||||||
{
|
{
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||||
FuDeviceClass *klass_device = FU_DEVICE_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->write_firmware = fu_altos_device_write_firmware;
|
||||||
klass_device->read_firmware = fu_altos_device_read_firmware;
|
klass_device->read_firmware = fu_altos_device_read_firmware;
|
||||||
object_class->finalize = fu_altos_device_finalize;
|
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);
|
FuAltosDeviceKind fu_altos_device_kind_from_string (const gchar *kind);
|
||||||
const gchar *fu_altos_device_kind_to_string (FuAltosDeviceKind kind);
|
const gchar *fu_altos_device_kind_to_string (FuAltosDeviceKind kind);
|
||||||
FuAltosDeviceKind fu_altos_device_get_kind (FuAltosDevice *device);
|
FuAltosDeviceKind fu_altos_device_get_kind (FuAltosDevice *device);
|
||||||
gboolean fu_altos_device_probe (FuAltosDevice *device,
|
|
||||||
GError **error);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ fu_plugin_usb_device_added (FuPlugin *plugin, GUsbDevice *usb_device, GError **e
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
/* get device properties */
|
/* get device properties */
|
||||||
if (!fu_altos_device_probe (dev, error))
|
if (!fu_device_probe (FU_DEVICE (dev), error))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
/* only the bootloader can do the update */
|
/* only the bootloader can do the update */
|
||||||
|
Loading…
Reference in New Issue
Block a user