[lkml]   [2015]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 2/2 v2] of/platform: Use platform_device interface
Hello Rob

On Tue, Apr 21, 2015 at 10:13 PM, Rob Herring <> wrote:
> On Tue, Apr 21, 2015 at 3:25 AM, Ricardo Ribalda Delgado
> <> wrote:
>> of_platform_device_create_pdata() was using of_device_add() to create
>> the devices, but of_platform_device_destroy was using
>> of_platform_device_destroy().
>> of_device_add(), do not call insert_resource(), which initializes the
>> parent field of the resource structure, needed by release_resource(),
>> called by of_platform_device_destroy().
> This is because some DTs have overlapping resources and doing this
> would break things. If you look at the git history, this was fixed and
> then reverted by Grant.

I cannot find that commit sorry, could you give me the hash or a link
to the mailing list?

ricardo@pilix:~/linux$ git shortlog drivers/of/platform.c | grep -i Revert
Revert "drivers: of: add initialization code for dma reserved memory"

To give a litte context to this patch, the issue started with this
conversaion with Bjorn:

What we have today is also wrong, it leads to a null pointer deference
(and therefore a whole crash).

If we cannot use platform_device_add, then we cannot use
platform_device_destroy :)

Shall I prepare a patch replacing platform_device_destroy()?


 \ /
  Last update: 2015-04-21 23:41    [W:0.067 / U:0.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site