Some more points can be noted resource_init function is not prefixed by __init >> >> >> 1) curr_level of the shared_resource is not updated in >> >> update_resource_level >> > >> >Yes, its not. Its done as part of the platform specific >> change_level call. >> >> [Romit] Kindly see below. I was thinking that it is better >> that we do not access any fields of struct shared_resource >> from outside this file. Would the line below solve the problem? > >The actual *target_level* of the resource will depend on the resource type. >Hence for say a "per_pwrdm_latency" resource if some user request's for a >latency of no more than 130ms, it inturn translates to a PWRDM_RET level >depending on the specific latency to go to RET/OFF. > >So what is currently done is the current_level of the resource in the above case >is set to PWRDM_RET and if done the way you are suggesting will be set to 130ms. [Romit] I agree that the curr_level/target_level will depend on the resource type and that is why it seems to be inside struct shared_resource. Anyway in the update_resource_level function the code is trying to find the maximum target level among the users of the resource. So I am not very clear why it can't be done as I mentioned earlier. Kindly see my replies to other patches you posted. -- 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