]> git.baikalelectronics.ru Git - kernel.git/commit
iwlwifi: pcie: simplify iwl_pci_find_dev_info()
authorJohannes Berg <johannes.berg@intel.com>
Sun, 24 Oct 2021 13:55:05 +0000 (16:55 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Thu, 28 Oct 2021 09:04:10 +0000 (12:04 +0300)
commit84b4765f333b439025419dfc99c693b3b0256f11
tree4d4f0c2e4e555b57da8a2dc01072c8ed3f122396
parente740b835af1f189fdada6aff840ae7b411876415
iwlwifi: pcie: simplify iwl_pci_find_dev_info()

We currently match the list of devices from the start to
the end, but then find the *last* match, so we need to
look at each and every entry. We don't want to change the
semantics ("most generic entry must come first"), so just
change the order of matching to be back-to-front, then we
can break out once we find a match.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20211024165252.abd85e1391cb.I7681fe90735044cc1c59f120e8591b7ac125535d@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/pcie/drv.c