drivers/parisc/eisa_eeprom.c
Source file repositories/reference/linux-study-clean/drivers/parisc/eisa_eeprom.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/parisc/eisa_eeprom.c- Extension
.c- Size
- 2065 bytes
- Lines
- 100
- Domain
- Driver Families
- Bucket
- drivers/parisc
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Touches user memory; correctness depends on fault-safe copying and privilege boundary handling.
- 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/module.hlinux/init.hlinux/kernel.hlinux/miscdevice.hlinux/slab.hlinux/fs.hasm/io.hlinux/uaccess.hasm/eisa_eeprom.h
Detected Declarations
function Copyrightfunction eisa_eeprom_readfunction eisa_eeprom_openfunction eisa_eeprom_releasefunction eisa_eeprom_initmodule init eisa_eeprom_init
Annotated Snippet
static const struct file_operations eisa_eeprom_fops = {
.owner = THIS_MODULE,
.llseek = eisa_eeprom_llseek,
.read = eisa_eeprom_read,
.open = eisa_eeprom_open,
.release = eisa_eeprom_release,
};
static struct miscdevice eisa_eeprom_dev = {
EISA_EEPROM_MINOR,
"eisa_eeprom",
&eisa_eeprom_fops
};
static int __init eisa_eeprom_init(void)
{
int retval;
if (!eisa_eeprom_addr)
return -ENODEV;
retval = misc_register(&eisa_eeprom_dev);
if (retval < 0) {
printk(KERN_ERR "EISA EEPROM: cannot register misc device.\n");
return retval;
}
printk(KERN_INFO "EISA EEPROM at 0x%px\n", eisa_eeprom_addr);
return 0;
}
MODULE_LICENSE("GPL");
module_init(eisa_eeprom_init);
Annotation
- Immediate include surface: `linux/module.h`, `linux/init.h`, `linux/kernel.h`, `linux/miscdevice.h`, `linux/slab.h`, `linux/fs.h`, `asm/io.h`, `linux/uaccess.h`.
- Detected declarations: `function Copyright`, `function eisa_eeprom_read`, `function eisa_eeprom_open`, `function eisa_eeprom_release`, `function eisa_eeprom_init`, `module init eisa_eeprom_init`.
- Atlas domain: Driver Families / drivers/parisc.
- Implementation status: pattern implementation candidate.
- This snippet crosses the user/kernel memory boundary; validate fault handling and access checks before translating the pattern.
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.