github.com/icexin/eggos@v0.4.2-0.20220216025428-78b167e4f349/drivers/pci/driver.go (about)

     1  package pci
     2  
     3  var drivers = map[string]Driver{}
     4  
     5  type Driver interface {
     6  	Name() string
     7  	Init(dev *Device) error
     8  	Idents() []Identity
     9  	Intr()
    10  }
    11  
    12  func Register(driver Driver) {
    13  	drivers[driver.Name()] = driver
    14  }