X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=device.c;h=aa1ec7828a36e5228094b2ad0c13a2edfe09b093;hb=f7d2982d42e876d8814cba203570a45284c79658;hp=04d463c13e2a9fe34d85a6fe7cdd4095be9ecae8;hpb=218557b85a308adc6ac533eb3f33d3dee17c13f8;p=libsigrok.git diff --git a/device.c b/device.c index 04d463c1..aa1ec782 100644 --- a/device.c +++ b/device.c @@ -30,7 +30,7 @@ void sr_device_scan(void) GSList *plugins, *l; struct sr_device_plugin *plugin; - plugins = list_hwplugins(); + plugins = sr_list_hwplugins(); /* * Initialize all plugins first. Since the init() call may involve @@ -146,7 +146,7 @@ void sr_device_probe_clear(struct sr_device *device, int probenum) } } -void sr_device_probe_add(struct sr_device *device, char *name) +void sr_device_probe_add(struct sr_device *device, const char *name) { struct sr_probe *p; char probename[16]; @@ -184,7 +184,8 @@ struct sr_probe *sr_device_probe_find(struct sr_device *device, int probenum) } /* TODO: return SIGROK_ERR if probenum not found */ -void sr_device_probe_name(struct sr_device *device, int probenum, char *name) +void sr_device_probe_name(struct sr_device *device, int probenum, + const char *name) { struct sr_probe *p; @@ -216,7 +217,8 @@ void sr_device_trigger_clear(struct sr_device *device) } /* TODO: return SIGROK_ERR if probenum not found */ -void sr_device_trigger_set(struct sr_device *device, int probenum, char *trigger) +void sr_device_trigger_set(struct sr_device *device, int probenum, + const char *trigger) { struct sr_probe *p; @@ -236,7 +238,7 @@ gboolean sr_device_has_hwcap(struct sr_device *device, int hwcap) int *capabilities, i; if (!device || !device->plugin) - return; + return FALSE; if ((capabilities = device->plugin->get_capabilities())) for (i = 0; capabilities[i]; i++)