- if (!dev->plugin) {
- sr_err("dev: %s: dev->plugin was NULL", __func__);
- return FALSE; /* TODO: SR_ERR_ARG. */
+ /*
+ * Virtual devices (which have dev->driver set to NULL) always say that
+ * they don't have the capability (they can't call hwcap_get_all()).
+ */
+ if (!dev->driver) {
+ sr_dbg("dev: %s: dev->driver was NULL, this seems to be "
+ "a virtual device without capabilities", __func__);
+ return FALSE;