Skip to content

Commit

Permalink
local: Simplify code
Browse files Browse the repository at this point in the history
iio_device_get_sample_size_mask(dev, dev->mask, dev->words)
is the exact same as:
iio_device_get_sample_size(dev)

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
  • Loading branch information
pcercuei committed Jan 18, 2022
1 parent 81b7802 commit 28e0434
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions local.c
Original file line number Diff line number Diff line change
Expand Up @@ -848,8 +848,7 @@ static int enable_high_speed(const struct iio_device *dev)

req.id = 0;
req.type = 0;
req.size = pdata->samples_count *
iio_device_get_sample_size_mask(dev, dev->mask, dev->words);
req.size = pdata->samples_count * iio_device_get_sample_size(dev);
req.count = nb_blocks;

ret = ioctl_nointr(fd, BLOCK_ALLOC_IOCTL, &req);
Expand Down

0 comments on commit 28e0434

Please sign in to comment.