drivers/video/fbdev/cyber2000fb.c

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

File Facts

System
Linux kernel
Corpus path
drivers/video/fbdev/cyber2000fb.c
Extension
.c
Size
45886 bytes
Lines
1872
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 cyberpro_driver = {
	.name		= "CyberPro",
	.probe		= cyberpro_pci_probe,
	.remove		= cyberpro_pci_remove,
	.driver.pm	= &cyberpro_pci_pm_ops,
	.id_table	= cyberpro_pci_table
};

/*
 * I don't think we can use the "module_init" stuff here because
 * the fbcon stuff may not be initialised yet.  Hence the #ifdef
 * around module_init.
 *
 * Tony: "module_init" is now required
 */
static int __init cyber2000fb_init(void)
{
	int ret = -1, err;

#ifndef MODULE
	char *option = NULL;
#endif

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

#ifndef MODULE
	if (fb_get_options("cyber2000fb", &option))
		return -ENODEV;
	cyber2000fb_setup(option);
#endif

	err = pci_register_driver(&cyberpro_driver);
	if (!err)
		ret = 0;

	return ret ? err : 0;
}
module_init(cyber2000fb_init);

static void __exit cyberpro_exit(void)
{
	pci_unregister_driver(&cyberpro_driver);
}
module_exit(cyberpro_exit);

MODULE_AUTHOR("Russell King");
MODULE_DESCRIPTION("CyberPro 2000, 2010 and 5000 framebuffer driver");
MODULE_LICENSE("GPL");

Annotation

Implementation Notes