[PATCH 0/1] NET: mcan: Move runtime PM enable/disable to m_can_platform

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



	Hi,

This is a preparatory patch for modifying PM enabling due to PCI based
M_CAN devices. As the functionality is right now, adding a PCI based
M_CAN driver causes the core PCI functionality to call
pm_runtime_enable() from pci_pm_init() when the PCI device is added.
When the device is added, it is registered with m_can_class_register(),
which ends up calling pm_runtime_enable() once more and causes the
kernel to log an angry 'Unbalanced pm_runtime_enable!' message, as
dev->power.disable_depth has gone down to zero.

To resolve this situation, I have added a patch that moves runtime PM
enabling from m_can.c to the m_can_platform.c driver, which currently
is the only driver that ends up enabling runtime PM. Would this
approach be appropriate, or should PM be enabled in some other way
with PCI based M_CAN devices?

Now, the actual sticky point is that there aren't yet any PCI based
M_CAN devices upstream, but one is in the works. So if the change
proposed works out, should this patch actually be sent in the patch
set providing a PCI based M_CAN device?


Thanks,

	Patrik


Patrik Flykt (1):
  NET: mcan: Move runtime PM enable/disable to m_can_platform

 drivers/net/can/m_can/m_can.c          | 6 +-----
 drivers/net/can/m_can/m_can_platform.c | 3 +++
 2 files changed, 4 insertions(+), 5 deletions(-)

-- 
2.27.0




[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux