device: Pass sdi as an function argument to config_list in dev_has_option()

With drivers that support multiple devices we need to know the device model
while listing options. That information is most of the time saved in the private
part of the dev_inst structure.

Pass the pointer to the dev_inst structure as an function argument so we have
access to this information.
This commit is contained in:
poljar (Damir Jelić) 2014-01-16 02:53:41 +01:00 committed by Bert Vermeulen
parent 580f309948
commit 92b68bb5d6
1 changed files with 1 additions and 1 deletions

View File

@ -210,7 +210,7 @@ SR_API gboolean sr_dev_has_option(const struct sr_dev_inst *sdi, int key)
return FALSE; return FALSE;
if (sdi->driver->config_list(SR_CONF_DEVICE_OPTIONS, if (sdi->driver->config_list(SR_CONF_DEVICE_OPTIONS,
&gvar, NULL, NULL) != SR_OK) &gvar, sdi, NULL) != SR_OK)
return FALSE; return FALSE;
ret = FALSE; ret = FALSE;