projects
/
platform
/
kernel
/
linux-rpi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
mtd: maps: vmu-flash: Fix the (mtd core) switch to ref counters
[platform/kernel/linux-rpi.git]
/
drivers
/
mtd
/
maps
/
vmu-flash.c
diff --git
a/drivers/mtd/maps/vmu-flash.c
b/drivers/mtd/maps/vmu-flash.c
index
a7ec947
..
53019d3
100644
(file)
--- a/
drivers/mtd/maps/vmu-flash.c
+++ b/
drivers/mtd/maps/vmu-flash.c
@@
-719,7
+719,7
@@
static int vmu_can_unload(struct maple_device *mdev)
card = maple_get_drvdata(mdev);
for (x = 0; x < card->partitions; x++) {
mtd = &((card->mtd)[x]);
- if (
mtd->usecount > 0
)
+ if (
kref_read(&mtd->refcnt)
)
return 0;
}
return 1;