summaryrefslogtreecommitdiff
path: root/common/spl/spl_fat.c
diff options
context:
space:
mode:
authorSean Anderson <[email protected]>2023-10-14 16:47:54 -0400
committerTom Rini <[email protected]>2023-10-17 20:50:52 -0400
commit93caa3efe25bb9d3e6265aa467dc5b6a2201819b (patch)
tree02c637fb5f2b374d5f6d2092aff3ce9273446204 /common/spl/spl_fat.c
parentacb96c170d7c9f9aed1755efe56387127a7dff0b (diff)
spl: Add callbacks to invalidate cached devices
Several SPL functions try to avoid performing initialization twice by caching devices. This is fine for regular boot, but does not work with UNIT_TEST, since all devices are torn down after each test. Add some functions to invalidate the caches which can be called before testing these load methods. Signed-off-by: Sean Anderson <[email protected]>
Diffstat (limited to 'common/spl/spl_fat.c')
-rw-r--r--common/spl/spl_fat.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/spl/spl_fat.c b/common/spl/spl_fat.c
index c6e2526ade1..b7b6a7794fd 100644
--- a/common/spl/spl_fat.c
+++ b/common/spl/spl_fat.c
@@ -20,6 +20,11 @@
static int fat_registered;
+void spl_fat_force_reregister(void)
+{
+ fat_registered = 0;
+}
+
static int spl_register_fat_device(struct blk_desc *block_dev, int partition)
{
int err = 0;