drivers/video/fbdev/via/via-core.c

Source file repositories/reference/linux-study-clean/drivers/video/fbdev/via/via-core.c

File Facts

System
Linux kernel
Corpus path
drivers/video/fbdev/via/via-core.c
Extension
.c
Size
19519 bytes
Lines
757
Domain
Driver Families
Bucket
drivers/video
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.

Dependency Surface

Detected Declarations

Annotated Snippet

static struct pci_driver via_driver = {
	.name		= "viafb",
	.id_table	= via_pci_table,
	.probe		= via_pci_probe,
	.remove		= via_pci_remove,
	.driver.pm	= &via_pm_ops,
};

static int __init via_core_init(void)
{
	int ret;

	if (fb_modesetting_disabled("viafb"))
		return -ENODEV;

	ret = viafb_init();
	if (ret)
		return ret;
	viafb_i2c_init();
	viafb_gpio_init();
	ret = pci_register_driver(&via_driver);
	if (ret) {
		viafb_gpio_exit();
		viafb_i2c_exit();
		return ret;
	}

	return 0;
}

static void __exit via_core_exit(void)
{
	pci_unregister_driver(&via_driver);
	viafb_gpio_exit();
	viafb_i2c_exit();
	viafb_exit();
}

module_init(via_core_init);
module_exit(via_core_exit);

Annotation

Implementation Notes