Skip to content

Commit

Permalink
iiod: Use <iio/iio-backend.h> instead of duplicating code
Browse files Browse the repository at this point in the history
It provides zalloc() and the enum iio_attr_type.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
  • Loading branch information
pcercuei committed Jan 24, 2024
1 parent 8356ce9 commit 056b8de
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions iiod/ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <endian.h>
#include <errno.h>
#include <iio/iio.h>
#include <iio/iio-backend.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
Expand Down Expand Up @@ -55,12 +56,6 @@ struct DevEntry;
extern struct iio_mutex *buflist_lock;
extern struct iio_mutex *evlist_lock;

enum iio_attr_type {
IIO_ATTR_TYPE_DEVICE,
IIO_ATTR_TYPE_DEBUG,
IIO_ATTR_TYPE_BUFFER,
};

struct block_entry {
SLIST_ENTRY(block_entry) entry;
struct iio_block *block;
Expand Down Expand Up @@ -129,11 +124,6 @@ struct iio_device_pdata {

extern bool server_demux; /* Defined in iiod.c */

static inline void *zalloc(size_t size)
{
return calloc(1, size);
}

void interpreter(struct iio_context *ctx, int fd_in, int fd_out,
bool is_socket, bool is_usb, struct thread_pool *pool,
const void *xml_zstd, size_t xml_zstd_len);
Expand Down

0 comments on commit 056b8de

Please sign in to comment.