+static struct sr_probe_group *select_probe_group(struct sr_dev_inst *sdi)
+{
+ struct sr_probe_group *pg;
+ GSList *l;
+
+ if (!opt_probe_group)
+ return NULL;
+
+ if (!sdi->probe_groups) {
+ g_critical("This device does not have any probe groups.");
+ return NULL;
+ }
+
+ for (l = sdi->probe_groups; l; l = l->next) {
+ pg = l->data;
+ if (!strcasecmp(opt_probe_group, pg->name)) {
+ return pg;
+ }
+ }
+
+ return NULL;
+}
+