lkml.org 
[lkml]   [2018]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 5/5] remoteproc: Introduce prepare and unprepare for subdevices
From
Date
On 05/29/2018 04:16 AM, Arnaud Pouliquen wrote:
. . .

>> +unroll_preparation:
>> + list_for_each_entry_continue_reverse(subdev, &rproc->subdevs, node) {
>> + if (subdev->unprepare)
>> + subdev->unprepare(subdev);
>> + }
> Here you could call rproc_unprepare_subdevices instead of duplicating
> the code.

I thought the same thing, but it won't work because we only want to
unprepare those devices that were successfully prepared. Here we are
unwinding the work that was partially done; in rproc_unprepare_subdevices()
*all* subdevices have their unprepare function called.

-Alex

\
 
 \ /
  Last update: 2018-05-29 13:53    [W:0.100 / U:1.668 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site