Re: Clarifying platform_device_unregister

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Dmitry Torokhov
Date: Monday, March 31, 2008 - 10:19 pm

Hi Jaya,

On Mon, Mar 31, 2008 at 09:14:35PM -0400, Jaya Kumar wrote:

Platform device code does kfree(pdev->dev.platform_data) unpon
unregistration, so it is not a good idea to assign address of
statically-allocated variable here. You should be using:

	platform_device_add_data(mytest_device, &mydata, sizeof(mydata));



Hope this helps.

-- 
Dmitry
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Clarifying platform_device_unregister, Jaya Kumar, (Mon Mar 31, 6:14 pm)
Re: Clarifying platform_device_unregister, Dmitry Torokhov, (Mon Mar 31, 10:19 pm)
Re: Clarifying platform_device_unregister, Jaya Kumar, (Tue Apr 1, 12:47 am)
Re: Clarifying platform_device_unregister, Dmitry Torokhov, (Tue Apr 1, 7:54 am)
Re: Clarifying platform_device_unregister, Jaya Kumar, (Tue Apr 1, 6:57 pm)
Re: Clarifying platform_device_unregister, Richard Purdie, (Sat Apr 5, 4:44 am)
Re: Clarifying platform_device_unregister, Richard Purdie, (Sat Apr 5, 5:07 am)