diff options
Diffstat (limited to 'platform-intel.c')
-rw-r--r-- | platform-intel.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/platform-intel.c b/platform-intel.c index 1e9ddcd..edb8679 100644 --- a/platform-intel.c +++ b/platform-intel.c @@ -233,7 +233,7 @@ struct pciExpDataStructFormat { struct orom_entry *orom_entries; -const struct imsm_orom *get_orom_by_device_id(__u16 dev_id) +const struct orom_entry *get_orom_entry_by_device_id(__u16 dev_id) { struct orom_entry *entry; struct devid_list *devid; @@ -241,13 +241,23 @@ const struct imsm_orom *get_orom_by_device_id(__u16 dev_id) for (entry = orom_entries; entry; entry = entry->next) { for (devid = entry->devid_list; devid; devid = devid->next) { if (devid->devid == dev_id) - return &entry->orom; + return entry; } } return NULL; } +const struct imsm_orom *get_orom_by_device_id(__u16 dev_id) +{ + const struct orom_entry *entry = get_orom_entry_by_device_id(dev_id); + + if (entry) + return &entry->orom; + + return NULL; +} + static struct orom_entry *add_orom(const struct imsm_orom *orom) { struct orom_entry *list; |