Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423130AbbFEQpr (ORCPT ); Fri, 5 Jun 2015 12:45:47 -0400 Received: from mail-vn0-f42.google.com ([209.85.216.42]:33553 "EHLO mail-vn0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752119AbbFEQpn (ORCPT ); Fri, 5 Jun 2015 12:45:43 -0400 MIME-Version: 1.0 In-Reply-To: <1433501478-15164-2-git-send-email-ricardo.ribalda@gmail.com> References: <1433501478-15164-1-git-send-email-ricardo.ribalda@gmail.com> <1433501478-15164-2-git-send-email-ricardo.ribalda@gmail.com> From: Rob Herring Date: Fri, 5 Jun 2015 11:45:22 -0500 Message-ID: Subject: Re: [PATCH 2/2] of/platform: Mark all device tree resources as SHARED To: Ricardo Ribalda Delgado Cc: Grant Likely , Rob Herring , Andrew Morton , Bjorn Helgaas , Vivek Goyal , Jakub Sitnicki , Mike Travis , Jiang Liu , Thierry Reding , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Greg Kroah-Hartman , Tejun Heo , Cliff Wickman Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1516 Lines: 42 On Fri, Jun 5, 2015 at 5:51 AM, Ricardo Ribalda Delgado wrote: > Some device tree platform do not define their resources properly. i.e. > overlapping or repeated resources. > > This patch mark all device tree resources as shareable. > > In the future this should only be set for the platforms that have > problems. I don't think we want to do this globally. This should be very rare and we want to discourage any new cases. Rob > > Signed-off-by: Ricardo Ribalda Delgado > --- > drivers/of/platform.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/of/platform.c b/drivers/of/platform.c > index ddf8e42c9367..89cb502f8812 100644 > --- a/drivers/of/platform.c > +++ b/drivers/of/platform.c > @@ -136,6 +136,8 @@ struct platform_device *of_device_alloc(struct device_node *np, > if (of_irq_to_resource_table(np, res, num_irq) != num_irq) > pr_debug("not all legacy IRQ resources mapped for %s\n", > np->name); > + for (i = 0; i < num_reg + num_irq; i++, res++) > + dev->resource[i].flags |= IORESOURCE_SHARED; > } > > dev->dev.of_node = of_node_get(np); > -- > 2.1.4 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/