LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   deallocation of resource allocated by platform_get_resources (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/deallocation-of-resource-allocated-by-platform_get_resources-584332/)

prabhakar_kushwaha 09-13-2007 12:44 AM

deallocation of resource allocated by platform_get_resources
 
Hi,

i am allocating a resource uing platform_get_resource().
Can any body tell me what will be the proper procedure of releasing this allocated
resource?

Regards,
Prabhakar

osor 09-13-2007 03:17 PM

Ummm… platform_get_resource() doesn’t actually allocate anything. It just cycles through all the resources in the specified platform_device matching the requested type and gives you the numth one. In this sense, it is merely a convenience function though it has the benefit of abstraction and hiding (i.e., it is inadvisable to duplicate its functionality since the implementation may change at any time).

dsouza_jack 11-28-2007 04:02 AM

you can use platform_device_put to Free all memory associated with a platform device.

Jackson.


All times are GMT -5. The time now is 03:34 PM.