+ rtc-honor-device-tree-alias-entries-when-assigning-ids-v2.patch added to -mm tree
Subject: + rtc-honor-device-tree-alias-entries-when-assigning-ids-v2.patch added to -mm tree
To: [email protected]
From: [email protected]
Date: Thu, 19 Dec 2013 13:58:49 -0800
The patch titled
Subject: rtc-honor-device-tree-alias-entries-when-assigning-ids-v2
has been added to the -mm tree. Its filename is
rtc-honor-device-tree-alias-entries-when-assigning-ids-v2.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/rtc-honor-device-tree-alias-entries-when-assigning-ids-v2.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/rtc-honor-device-tree-alias-entries-when-assigning-ids-v2.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated there every 3-4 working days
------------------------------------------------------
From: Stephen Warren <[email protected]>
Subject: rtc-honor-device-tree-alias-entries-when-assigning-ids-v2
v2: Explicitly check for both dev->of_node and dev->parent->of_node.
This covers the MFD case, without the MFD core having to set child MFD devices' of_node pointer to the same node as the top- level MFD device, which causes problems such as:
http://www.spinics.net/lists/arm-kernel/msg295854.html
---
drivers/rtc/class.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-)
drivers/rtc/class.c renamed from drivers/rtc/class.c~rtc-honor-device-tree-alias-entries-when-assigning-ids-v2 +11 -9
@@ -158,17 +158,19 @@ struct rtc_device *rtc_device_register(c {struct rtc_device *rtc;struct rtc_wkalrm alrm; -int of_id, id =-1 , err; +int of_id =-1 , id =-1 , err; -if (dev->of_node) { +if (dev->of_node) of_id =of_alias_get_id (dev->of_node,"rtc" ); -if (of_id >=0 ) { - id =ida_simple_get (&rtc_ida, of_id, of_id +1 , -GFP_KERNEL ); -if (id <0 ) -dev_warn (dev,"/aliases ID %d not available\n" , - of_id); - } +else if (dev->parent && dev->parent->of_node) + of_id =of_alias_get_id (dev->parent->of_node,"rtc" ); + +if (of_id >=0 ) { + id =ida_simple_get (&rtc_ida, of_id, of_id +1 , +GFP_KERNEL ); +if (id <0 ) +dev_warn (dev,"/aliases ID %d not available\n" , + of_id); }if (id <0 ) {
_
Patches currently in -mm which might be from [email protected] are
origin.patch rtc-honor-device-tree-alias-entries-when-assigning-ids.patch rtc-honor-device-tree-alias-entries-when-assigning-ids-v2.patch linux-next.patch