File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
drivers/pci/controller/dwc Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -773,7 +773,6 @@ static const struct of_device_id kirin_pcie_match[] = {
773
773
static int kirin_pcie_probe (struct platform_device * pdev )
774
774
{
775
775
enum pcie_kirin_phy_type phy_type ;
776
- const struct of_device_id * of_id ;
777
776
struct device * dev = & pdev -> dev ;
778
777
struct kirin_pcie * kirin_pcie ;
779
778
struct dw_pcie * pci ;
@@ -784,13 +783,12 @@ static int kirin_pcie_probe(struct platform_device *pdev)
784
783
return - EINVAL ;
785
784
}
786
785
787
- of_id = of_match_device ( kirin_pcie_match , dev );
788
- if (!of_id ) {
786
+ phy_type = ( long ) of_device_get_match_data ( dev );
787
+ if (!phy_type ) {
789
788
dev_err (dev , "OF data missing\n" );
790
789
return - EINVAL ;
791
790
}
792
791
793
- phy_type = (long )of_id -> data ;
794
792
795
793
kirin_pcie = devm_kzalloc (dev , sizeof (struct kirin_pcie ), GFP_KERNEL );
796
794
if (!kirin_pcie )
You can’t perform that action at this time.
0 commit comments