Skip to content

Commit

Permalink
iiod: Update to new iio_device_get_trigger() prototype
Browse files Browse the repository at this point in the history
Update IIOD to use the new prototype of the iio_device_get_trigger()
function.

Signed-off-by: Paul Cercueil <[email protected]>
  • Loading branch information
pcercuei committed Oct 10, 2023
1 parent 8f2bfda commit 58a807d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 3 additions & 2 deletions iiod/ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -1457,8 +1457,9 @@ ssize_t get_trigger(struct parser_pdata *pdata, struct iio_device *dev)
return -ENODEV;
}

ret = iio_device_get_trigger(dev, &trigger);
if (!ret && trigger) {
trigger = iio_device_get_trigger(dev);
ret = iio_err(trigger);
if (!ret) {
const char *name = iio_device_get_name(trigger);
char buf[256];

Expand Down
5 changes: 2 additions & 3 deletions iiod/responder.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,8 @@ static void handle_gettrig(struct parser_pdata *pdata,
if (!dev)
goto out_send_response;

ret = iio_device_get_trigger(dev, &trigger);
if (!ret && !trigger)
ret = -ENODEV;
trigger = iio_device_get_trigger(dev);
ret = iio_err(trigger);
if (ret)
goto out_send_response;

Expand Down

0 comments on commit 58a807d

Please sign in to comment.