(cls, image, symbol)
| 142 | |
| 143 | @classmethod |
| 144 | def load(cls, image, symbol): |
| 145 | name = symbol.string_value |
| 146 | |
| 147 | options = {} |
| 148 | for key, suffix in cls.OPTIONS: |
| 149 | option_symbol = image.find_by_name("__%s%s" % (name, suffix)) |
| 150 | if option_symbol: |
| 151 | value = option_symbol.string_value |
| 152 | options[key] = value |
| 153 | |
| 154 | driver = cls(name, options) |
| 155 | |
| 156 | pci_table_name_symbol = image.find_by_name("__%s_pci_tbl_export" % name) |
| 157 | if pci_table_name_symbol: |
| 158 | driver.pci_ids = cls._load_pci_ids(image, pci_table_name_symbol) |
| 159 | |
| 160 | return driver |
| 161 | |
| 162 | @staticmethod |
| 163 | def _load_pci_ids(image, table_name_symbol): |
no test coverage detected