Skip to content

Commit e9c8011

Browse files
committed
iio-backend: Remove unused callback .get_description
This callback was introduced in commit d61f629 ("iio: backend: add get_description() backend op") but was never called anywhere, as the backend's description string is also present in the XML directly. Signed-off-by: Paul Cercueil <[email protected]>
1 parent 0ed18cd commit e9c8011

File tree

4 files changed

+4
-23
lines changed

4 files changed

+4
-23
lines changed

iio-backend.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ struct iio_backend_ops {
6060

6161
void (*shutdown)(struct iio_context *ctx);
6262

63-
char * (*get_description)(const struct iio_context *ctx);
64-
6563
int (*get_version)(const struct iio_context *ctx, unsigned int *major,
6664
unsigned int *minor, char git_tag[8]);
6765

local.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1976,7 +1976,6 @@ static const struct iio_backend_ops local_ops = {
19761976
.get_trigger = local_get_trigger,
19771977
.set_trigger = local_set_trigger,
19781978
.shutdown = local_shutdown,
1979-
.get_description = local_get_description,
19801979
.set_timeout = local_set_timeout,
19811980
.cancel = local_cancel,
19821981
};

network.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ int create_socket(const struct addrinfo *addrinfo)
282282
return fd;
283283
}
284284

285-
static char * __network_get_description(struct addrinfo *res)
285+
static char * network_get_description(struct addrinfo *res)
286286
{
287287
char *description;
288288
unsigned int len;
@@ -334,13 +334,6 @@ static char * __network_get_description(struct addrinfo *res)
334334
return description;
335335
}
336336

337-
static char *network_get_description(const struct iio_context *ctx)
338-
{
339-
struct iio_context_pdata *pdata = iio_context_get_pdata(ctx);
340-
341-
return __network_get_description(pdata->addrinfo);
342-
}
343-
344337
static int network_open(const struct iio_device *dev,
345338
size_t samples_count, bool cyclic)
346339
{
@@ -926,7 +919,6 @@ static const struct iio_backend_ops network_ops = {
926919
.get_trigger = network_get_trigger,
927920
.set_trigger = network_set_trigger,
928921
.shutdown = network_shutdown,
929-
.get_description = network_get_description,
930922
.get_version = network_get_version,
931923
.set_timeout = network_set_timeout,
932924
.set_kernel_buffers_count = network_set_kernel_buffers_count,
@@ -1144,7 +1136,7 @@ struct iio_context * network_create_context(const char *host)
11441136
goto err_close_socket;
11451137
}
11461138

1147-
description = __network_get_description(res);
1139+
description = network_get_description(res);
11481140
if (!description)
11491141
goto err_free_pdata;
11501142

serial.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ static int serial_get_version(const struct iio_context *ctx,
105105
major, minor, git_tag);
106106
}
107107

108-
static char * __serial_get_description(struct sp_port *port)
108+
static char * serial_get_description(struct sp_port *port)
109109
{
110110
char *description, *name, *desc;
111111
size_t desc_len;
@@ -125,13 +125,6 @@ static char * __serial_get_description(struct sp_port *port)
125125
return description;
126126
}
127127

128-
static char * serial_get_description(const struct iio_context *ctx)
129-
{
130-
struct iio_context_pdata *pdata = iio_context_get_pdata(ctx);
131-
132-
return __serial_get_description(pdata->port);
133-
}
134-
135128
static int serial_open(const struct iio_device *dev,
136129
size_t samples_count, bool cyclic)
137130
{
@@ -385,7 +378,6 @@ static const struct iio_backend_ops serial_ops = {
385378
.write_channel_attr = serial_write_chn_attr,
386379
.set_kernel_buffers_count = serial_set_kernel_buffers_count,
387380
.shutdown = serial_shutdown,
388-
.get_description = serial_get_description,
389381
.set_timeout = serial_set_timeout,
390382
.get_trigger = serial_get_trigger,
391383
.set_trigger = serial_set_trigger,
@@ -463,7 +455,7 @@ static struct iio_context * serial_create_context(const char *port_name,
463455
/* Empty the buffers */
464456
sp_flush(port, SP_BUF_BOTH);
465457

466-
description = __serial_get_description(port);
458+
description = serial_get_description(port);
467459
if (!description)
468460
goto err_close_port;
469461

0 commit comments

Comments
 (0)