drivers/mtd/mtdpstore.c
Source file repositories/reference/linux-study-clean/drivers/mtd/mtdpstore.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/mtd/mtdpstore.c- Extension
.c- Size
- 14895 bytes
- Lines
- 580
- Domain
- Driver Families
- Bucket
- drivers/mtd
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/module.hlinux/pstore_blk.hlinux/mtd/mtd.hlinux/bitops.hlinux/slab.h
Detected Declarations
function mtdpstore_block_isbadfunction mtdpstore_panic_block_isbadfunction mtdpstore_mark_usedfunction mtdpstore_mark_unusedfunction mtdpstore_block_mark_unusedfunction mtdpstore_is_usedfunction mtdpstore_block_is_usedfunction mtdpstore_is_emptyfunction mtdpstore_mark_removedfunction mtdpstore_block_clear_removedfunction mtdpstore_block_is_removedfunction mtdpstore_erase_dofunction mtdpstore_erasefunction mtdpstore_securityfunction mtdpstore_writefunction mtdpstore_is_io_errorfunction mtdpstore_readfunction mtdpstore_panic_writefunction mtdpstore_notify_addfunction mtdpstore_flush_removed_dofunction mtdpstore_flush_removedfunction mtdpstore_notify_removefunction mtdpstore_initfunction mtdpstore_exitmodule init mtdpstore_init
Annotated Snippet
module_init(mtdpstore_init);
static void __exit mtdpstore_exit(void)
{
unregister_mtd_user(&mtdpstore_notifier);
}
module_exit(mtdpstore_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("WeiXiong Liao <liaoweixiong@allwinnertech.com>");
MODULE_DESCRIPTION("MTD backend for pstore/blk");
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/module.h`, `linux/pstore_blk.h`, `linux/mtd/mtd.h`, `linux/bitops.h`, `linux/slab.h`.
- Detected declarations: `function mtdpstore_block_isbad`, `function mtdpstore_panic_block_isbad`, `function mtdpstore_mark_used`, `function mtdpstore_mark_unused`, `function mtdpstore_block_mark_unused`, `function mtdpstore_is_used`, `function mtdpstore_block_is_used`, `function mtdpstore_is_empty`, `function mtdpstore_mark_removed`, `function mtdpstore_block_clear_removed`.
- Atlas domain: Driver Families / drivers/mtd.
- Implementation status: integration implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.