X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=hwdriver.c;h=189b0331031a6a289ed45374617156a9a9acfc60;hb=41bad9283d5bf869cfdf3d54373bec4dc51eaf16;hp=100063d85cf793271104e4836a622763757ad75a;hpb=ddd9b41f5af2c5f1719439546a378d91ceef6c30;p=libsigrok.git diff --git a/hwdriver.c b/hwdriver.c index 100063d8..189b0331 100644 --- a/hwdriver.c +++ b/hwdriver.c @@ -345,37 +345,6 @@ SR_API int sr_config_list(struct sr_dev_driver *driver, int id, return ret; } -/** - * Find out if a hardware driver has a specific capability. - * - * @param driver The hardware driver in which to search for the capability. - * @param hwcap The capability to find in the list. - * - * @return TRUE if the specified capability exists in the specified driver, - * FALSE otherwise. Also, if 'driver' is NULL or the respective driver - * returns an invalid capability list, FALSE is returned. - */ -SR_API gboolean sr_driver_hwcap_exists(struct sr_dev_driver *driver, int hwcap) -{ - const int *hwcaps; - int i; - - if (!driver) { - sr_err("hwdriver: %s: driver was NULL", __func__); - return FALSE; - } - - if (driver->config_list(SR_CONF_DEVICE_OPTIONS, (const void **)&hwcaps, NULL) != SR_OK) - return FALSE; - - for (i = 0; hwcaps[i]; i++) { - if (hwcaps[i] == hwcap) - return TRUE; - } - - return FALSE; -} - /** * Get information about an sr_config key. *