summaryrefslogtreecommitdiff
path: root/mm/zswap.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2015-05-13 16:04:45 +0200
committerJonathan Cameron <jic23@kernel.org>2015-05-17 09:45:22 +0100
commit248be5aafc7cfe860b8f310bfc3f433e51f9fb11 (patch)
treee42c9d84daba621a14f7f53518f628db0bce848b /mm/zswap.c
parent63223c5f5c11b832586edca28cfc7d2850bc3e44 (diff)
iio: __iio_update_buffers: Slightly refactor scan mask memory management
Add a small helper function iio_free_scan_mask() that takes a mask and frees its memory if the scan masks for the device are dynamically allocated, otherwise does nothing. This means we don't have to open-code the same check over and over again in __iio_update_buffers. Also free compound_mask as soon a we are done using it. This constrains its usage to a specific region of the function will make further refactoring and splitting the function into smaller sub-parts more easier. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'mm/zswap.c')
0 files changed, 0 insertions, 0 deletions