aboutsummaryrefslogtreecommitdiffstats
path: root/lib/string_helpers.c
diff options
context:
space:
mode:
authorBjorn Helgaas <[email protected]>2022-02-02 15:52:41 +0000
committerBjorn Helgaas <[email protected]>2022-02-04 21:14:26 +0000
commit7dd3876205df92e07d824fe2264b38e0b8a9eec1 (patch)
tree7e0ba019123eff817fd5ade7fe67a07cb780e3aa /lib/string_helpers.c
parentPCI: j721e: Initialize pcie->cdns_pcie before using it (diff)
downloadkernel-7dd3876205df92e07d824fe2264b38e0b8a9eec1.tar.gz
kernel-7dd3876205df92e07d824fe2264b38e0b8a9eec1.zip
PCI: kirin: Add dev struct for of_device_get_match_data()
Bean reported that a622435fbe1a ("PCI: kirin: Prefer of_device_get_match_data()") broke kirin_pcie_probe() because it assumed match data of 0 was a failure when in fact, it meant the match data was "(void *)PCIE_KIRIN_INTERNAL_PHY". Therefore, probing of "hisilicon,kirin960-pcie" devices failed with -EINVAL and an "OF data missing" message. Add a struct kirin_pcie_data to encode the PHY type. Then the result of of_device_get_match_data() should always be a non-NULL pointer to a struct kirin_pcie_data that contains the PHY type. Fixes: a622435fbe1a ("PCI: kirin: Prefer of_device_get_match_data()") Link: https://lore.kernel.org/r/20220202162659.GA12603@bhelgaas Link: https://lore.kernel.org/r/[email protected] Reported-by: Bean Huo <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
Diffstat (limited to 'lib/string_helpers.c')
0 files changed, 0 insertions, 0 deletions