Remove sr_driver_hwcap_exists().
This commit is contained in:
parent
4d15e5c907
commit
41bad9283d
31
hwdriver.c
31
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.
|
||||
*
|
||||
|
|
1
proto.h
1
proto.h
|
@ -74,7 +74,6 @@ SR_API int sr_config_get(struct sr_dev_driver *driver, int id,
|
|||
const void **data, const struct sr_dev_inst *sdi);
|
||||
SR_API int sr_config_list(struct sr_dev_driver *driver, int id,
|
||||
const void **data, const struct sr_dev_inst *sdi);
|
||||
SR_API gboolean sr_driver_hwcap_exists(struct sr_dev_driver *driver, int hwcap);
|
||||
SR_API const struct sr_config_info *sr_config_info_get(int key);
|
||||
SR_API const struct sr_config_info *sr_config_info_name_get(const char *optname);
|
||||
|
||||
|
|
Loading…
Reference in New Issue