Subject: [folded-merged] rtc-honor-device-tree-alias-entries-when-assigning-ids-v2.patch removed from -mm tree To: swarren@xxxxxxxxxx,mm-commits@xxxxxxxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Thu, 23 Jan 2014 15:27:35 -0800 The patch titled Subject: rtc-honor-device-tree-alias-entries-when-assigning-ids-v2 has been removed from the -mm tree. Its filename was rtc-honor-device-tree-alias-entries-when-assigning-ids-v2.patch This patch was dropped because it was folded into rtc-honor-device-tree-alias-entries-when-assigning-ids.patch ------------------------------------------------------ From: Stephen Warren <swarren@xxxxxxxxxx> 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 Signed-off-by: Stephen Warren <swarren@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/rtc/class.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff -puN drivers/rtc/class.c~rtc-honor-device-tree-alias-entries-when-assigning-ids-v2 drivers/rtc/class.c --- a/drivers/rtc/class.c~rtc-honor-device-tree-alias-entries-when-assigning-ids-v2 +++ a/drivers/rtc/class.c @@ -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 swarren@xxxxxxxxxx are origin.patch rtc-honor-device-tree-alias-entries-when-assigning-ids.patch rtc-max8907-weekday-encoding-fixes.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html