Message ID | CAJt7DwwqoJMWk1=-BO5O+cfutLfTwE04oYo46GqcMhb9zgGwPA@mail.gmail.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Hi, So, frankly, we haven't been maintaining < 3.10 or so well. > I tried building against various kernels and didn't find > netdev_upper_dev_link' defined until 3, so anything less that that probably > has this error. I didn't know exactly what to use here so I just did an > #if 0 around that section and resolved the problem for me. IIRC we did the same in our internal tree, it simply can't be done on earlier kernels - Luca, care to send that out? > The second problem is in commit 2ebca7b7d087be04e25b1fc50cf08137d423af3d. > > Author: Luca Coelho <luciano.coelho@intel.com> > Date: Tue Apr 19 22:13:11 2016 +0300 > > backport: add pm_runtime_active() implementation for < 3.9 kernels Oi, that's pretty old. > In linux/pm.h, those members addition to the struct are controlled by > CONFIG_PM_RUNTIME, not CONFIG_PM. I changed pm_runtime.h to > use CONFIG_PM_RUNTIME and that resolved the problem. Interesting. Can you send the patch? johannes -- To unsubscribe from this list: send the line "unsubscribe backports" in
diff --git a/backport/backport-include/linux/pm_runtime.h b/backport/backport-include/linu new file mode 100644 index 0000000..16d2a80 --- /dev/null +++ b/backport/backport-include/linux/pm_runtime.h @@ -0,0 +1,19 @@ +#ifndef __BACKPORT_PM_RUNTIME_H +#define __BACKPORT_PM_RUNTIME_H +#include_next <linux/pm_runtime.h> + +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0) +#define pm_runtime_active LINUX_BACKPORT(pm_runtime_active) +#ifdef CONFIG_PM +static inline bool pm_runtime_active(struct device *dev) +{ + return dev->power.runtime_status == RPM_ACTIVE + || dev->power.disable_depth; +} +#else +static inline bool pm_runtime_active(struct device *dev) { return true; } +#endif /* CONFIG_PM */ + +#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0) */ + +#endif /* __BACKPORT_PM_RUNTIME_H */