Hi, * DORRE Stephane <sdorre@xxxxxxxxxxx> [161117 04:57]: > Hello, > > I got a kernel panic when tryin to call the function omap_dm_timers_active(void) > from dmtimer module. Shouldn't we enable the timer before trying to read a > register on the dmtimer module ? Looks like that's not used anywhere.. What are you trying to use it for? > As the function is checking all Timers, we cannot simply enable the timer before > the call the this function. > > So is this patch valid ?? Well I don't think we should blindly enable them as we don't know what they are configured to do. How about add a test for pm_runtime_active(&timer->pdev->dev) to the loop? Assuming we just want to see if any timers are active: if (!pm_runtime_active(&timer->pdev->dev)) continue; ... Or if we really need to read the CTRL_REG: pm_runtime_get_sync(&timer->pdev->dev); reg = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); ... pm_runtime_put_sync(&timer->pdev->dev); Regards, Tony -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html