SolidRun / linux-fslc

Linux kernel source tree
Other
12 stars 26 forks source link

[IMX6] PCI host driver doesn't compile if PM_SLEEP is not set #39

Closed fanste closed 6 years ago

fanste commented 8 years ago

This commit added power management to the IMX6 PCI host driver but with an small issue. The driver doesn't compile anymore it CONFIG_PM_SLEEP is not set.

Line 1295 uses an struct which is only defined when the option is set. I think the usage should be guarded by the same #ifdef as the struct.

static struct platform_driver imx6_pcie_driver = {
        .driver = {
                .name   = "imx6q-pcie",
                .owner  = THIS_MODULE,
                .of_match_table = imx6_pcie_of_match,
#ifdef CONFIG_PM_SLEEP
                .pm = &pci_imx_pm_ops,
#endif
        },
        .shutdown = imx6_pcie_shutdown,
};