sr: Made the dev_info_get return value const
This commit is contained in:
parent
915f7cc87a
commit
b7f578bef5
|
@ -168,7 +168,7 @@ static int hw_cleanup(void)
|
|||
return SR_OK;
|
||||
}
|
||||
|
||||
static void *hw_dev_info_get(int dev_index, int dev_info_id)
|
||||
static const void *hw_dev_info_get(int dev_index, int dev_info_id)
|
||||
{
|
||||
struct sr_dev_inst *sdi;
|
||||
struct context *ctx;
|
||||
|
|
|
@ -753,11 +753,11 @@ static int hw_cleanup(void)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void *hw_dev_info_get(int dev_index, int dev_info_id)
|
||||
static const void *hw_dev_info_get(int dev_index, int dev_info_id)
|
||||
{
|
||||
struct sr_dev_inst *sdi;
|
||||
struct context *ctx;
|
||||
void *info = NULL;
|
||||
const void *info = NULL;
|
||||
|
||||
if (!(sdi = sr_dev_inst_get(dev_insts, dev_index))) {
|
||||
sr_err("sigma: %s: sdi was NULL", __func__);
|
||||
|
|
|
@ -681,11 +681,11 @@ static int hw_cleanup(void)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void *hw_dev_info_get(int dev_index, int dev_info_id)
|
||||
static const void *hw_dev_info_get(int dev_index, int dev_info_id)
|
||||
{
|
||||
struct sr_dev_inst *sdi;
|
||||
struct context *ctx;
|
||||
void *info;
|
||||
const void *info;
|
||||
|
||||
if (!(sdi = sr_dev_inst_get(dev_insts, dev_index))) {
|
||||
sr_err("la8: %s: sdi was NULL", __func__);
|
||||
|
|
|
@ -184,10 +184,10 @@ static int hw_cleanup(void)
|
|||
return SR_OK;
|
||||
}
|
||||
|
||||
static void *hw_dev_info_get(int dev_index, int dev_info_id)
|
||||
static const void *hw_dev_info_get(int dev_index, int dev_info_id)
|
||||
{
|
||||
struct sr_dev_inst *sdi;
|
||||
void *info = NULL;
|
||||
const void *info = NULL;
|
||||
|
||||
if (!(sdi = sr_dev_inst_get(dev_insts, dev_index))) {
|
||||
sr_err("demo: %s: sdi was NULL", __func__);
|
||||
|
|
|
@ -546,7 +546,7 @@ static int hw_cleanup(void)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void *hw_dev_info_get(int dev_index, int dev_info_id)
|
||||
static const void *hw_dev_info_get(int dev_index, int dev_info_id)
|
||||
{
|
||||
struct sr_dev_inst *sdi;
|
||||
struct context *ctx;
|
||||
|
|
|
@ -607,11 +607,11 @@ static int hw_dev_close(int dev_index)
|
|||
return SR_OK;
|
||||
}
|
||||
|
||||
static void *hw_dev_info_get(int dev_index, int dev_info_id)
|
||||
static const void *hw_dev_info_get(int dev_index, int dev_info_id)
|
||||
{
|
||||
struct sr_dev_inst *sdi;
|
||||
struct context *ctx;
|
||||
void *info = NULL;
|
||||
const void *info = NULL;
|
||||
|
||||
if (!(sdi = sr_dev_inst_get(dev_insts, dev_index)))
|
||||
return NULL;
|
||||
|
|
|
@ -557,11 +557,11 @@ static int hw_cleanup(void)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void *hw_dev_info_get(int dev_index, int dev_info_id)
|
||||
static const void *hw_dev_info_get(int dev_index, int dev_info_id)
|
||||
{
|
||||
struct sr_dev_inst *sdi;
|
||||
struct context *ctx;
|
||||
void *info;
|
||||
const void *info;
|
||||
|
||||
if (!(sdi = sr_dev_inst_get(dev_insts, dev_index)))
|
||||
return NULL;
|
||||
|
|
|
@ -499,11 +499,11 @@ static int hw_cleanup(void)
|
|||
return SR_OK;
|
||||
}
|
||||
|
||||
static void *hw_dev_info_get(int dev_index, int dev_info_id)
|
||||
static const void *hw_dev_info_get(int dev_index, int dev_info_id)
|
||||
{
|
||||
struct sr_dev_inst *sdi;
|
||||
struct context *ctx;
|
||||
void *info;
|
||||
const void *info;
|
||||
|
||||
if (!(sdi = sr_dev_inst_get(dev_insts, dev_index))) {
|
||||
sr_err("zp: %s: sdi was NULL", __func__);
|
||||
|
|
|
@ -463,7 +463,7 @@ struct sr_dev_driver {
|
|||
/* Device-specific */
|
||||
int (*dev_open) (int dev_index);
|
||||
int (*dev_close) (int dev_index);
|
||||
void *(*dev_info_get) (int dev_index, int dev_info_id);
|
||||
const void *(*dev_info_get) (int dev_index, int dev_info_id);
|
||||
int (*dev_status_get) (int dev_index);
|
||||
const int *(*hwcap_get_all) (void);
|
||||
int (*dev_config_set) (int dev_index, int hwcap, void *value);
|
||||
|
|
|
@ -176,7 +176,8 @@ SR_API char **sr_parse_triggerstring(struct sr_dev *dev,
|
|||
GSList *l;
|
||||
struct sr_probe *probe;
|
||||
int max_probes, probenum, i;
|
||||
char **tokens, **triggerlist, *trigger, *tc, *trigger_types;
|
||||
char **tokens, **triggerlist, *trigger, *tc;
|
||||
const char *trigger_types;
|
||||
gboolean error;
|
||||
|
||||
max_probes = g_slist_length(dev->probes);
|
||||
|
|
Loading…
Reference in New Issue