aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ipa/ipa_mem.h
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2021-06-10 14:23:07 -0500
committerDavid S. Miller <davem@davemloft.net>2021-06-10 14:50:08 -0700
commit5e3bc1e5d0021c2efcbc8ba7da7b96c6a502d8bf (patch)
tree318480594466e478e5e245e8160906107ffa9751 /drivers/net/ipa/ipa_mem.h
parente9f5b2766e706f3020b3d975fee3b42d056b0849 (diff)
net: ipa: introduce ipa_mem_find()
Introduce a new function that abstracts finding information about a region in IPA-local memory, given its memory region ID. For now it simply uses the region ID as an index into the IPA memory array. If the region is not defined, ipa_mem_find() returns a null pointer. Update all code that accesses the ipa->mem[] array directly to use ipa_mem_find() instead. The return value must be checked for null when optional memory regions are sought. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ipa/ipa_mem.h')
-rw-r--r--drivers/net/ipa/ipa_mem.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ipa/ipa_mem.h b/drivers/net/ipa/ipa_mem.h
index effe01f7310a..712b2881be0c 100644
--- a/drivers/net/ipa/ipa_mem.h
+++ b/drivers/net/ipa/ipa_mem.h
@@ -90,6 +90,8 @@ struct ipa_mem {
u16 canary_count;
};
+const struct ipa_mem *ipa_mem_find(struct ipa *ipa, enum ipa_mem_id mem_id);
+
int ipa_mem_config(struct ipa *ipa);
void ipa_mem_deconfig(struct ipa *ipa);