summaryrefslogtreecommitdiff
path: root/include/linux/hugetlb_inline.h
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2026-06-01 15:13:58 +0100
committerMark Brown <broonie@kernel.org>2026-06-01 15:13:58 +0100
commita67c554dbc0fdd7e3c5909cb9f0fff41c51b2e9d (patch)
treea1a3beca9a4d32efd7d7c2da09b924a7d51237e5 /include/linux/hugetlb_inline.h
parent6c52e58dbdaed2eea6cd10461e6b7fb3de4c99d5 (diff)
parentf8e7cd48e5b3b38ec5e1542b73b670a7770d2d7c (diff)
downloadlwn-a67c554dbc0fdd7e3c5909cb9f0fff41c51b2e9d.tar.gz
lwn-a67c554dbc0fdd7e3c5909cb9f0fff41c51b2e9d.zip
ASoC: nau8822: add support for supply regulators
Alexey Charkov <alchark@flipper.net> says: The Nuvoton NAU8822 codec has four power supply pins: VDDA, VDDB, VDDC and VDDSPK, which must be online and stable before the device can be accessed over I2C. On boards where these rails are software-controlled, probing the codec before the regulators are up results in -ENXIO errors during register access. This short series adds optional regulator support to both the device tree binding and the driver, so platforms that need explicit power sequencing can describe and enforce it: Link: https://patch.msgid.link/20260525-nau8822-reg-v2-0-7d37ae393e46@flipper.net
Diffstat (limited to 'include/linux/hugetlb_inline.h')
-rw-r--r--include/linux/hugetlb_inline.h14
1 files changed, 2 insertions, 12 deletions
diff --git a/include/linux/hugetlb_inline.h b/include/linux/hugetlb_inline.h
index 565b473fd135..5c29cd3223a1 100644
--- a/include/linux/hugetlb_inline.h
+++ b/include/linux/hugetlb_inline.h
@@ -6,23 +6,13 @@
#ifdef CONFIG_HUGETLB_PAGE
-static inline bool is_vm_hugetlb_flags(vm_flags_t vm_flags)
-{
- return !!(vm_flags & VM_HUGETLB);
-}
-
static inline bool is_vma_hugetlb_flags(const vma_flags_t *flags)
{
- return vma_flags_test_any(flags, VMA_HUGETLB_BIT);
+ return vma_flags_test(flags, VMA_HUGETLB_BIT);
}
#else
-static inline bool is_vm_hugetlb_flags(vm_flags_t vm_flags)
-{
- return false;
-}
-
static inline bool is_vma_hugetlb_flags(const vma_flags_t *flags)
{
return false;
@@ -32,7 +22,7 @@ static inline bool is_vma_hugetlb_flags(const vma_flags_t *flags)
static inline bool is_vm_hugetlb_page(const struct vm_area_struct *vma)
{
- return is_vm_hugetlb_flags(vma->vm_flags);
+ return is_vma_hugetlb_flags(&vma->flags);
}
#endif