Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754975AbbHCTXr (ORCPT ); Mon, 3 Aug 2015 15:23:47 -0400 Received: from mail-la0-f43.google.com ([209.85.215.43]:34894 "EHLO mail-la0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753466AbbHCTXp (ORCPT ); Mon, 3 Aug 2015 15:23:45 -0400 Subject: Re: [PATCH] usb: ehci-platform: Fix using multiple controllers from OF To: Alban Bedel , linux-usb@vger.kernel.org References: <1438629150-11662-1-git-send-email-albeu@free.fr> Cc: Tony Prisk , Alan Stern , Greg Kroah-Hartman , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org From: Sergei Shtylyov Organization: Cogent Embedded Message-ID: <55BFBFBE.5050905@cogentembedded.com> Date: Mon, 3 Aug 2015 22:23:42 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <1438629150-11662-1-git-send-email-albeu@free.fr> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1529 Lines: 46 On 08/03/2015 10:12 PM, Alban Bedel wrote: > When using OF defined controllers the platform data struct is shared > between all devices, so it can't be used for device specific settings. > However it is currently used for the OF properties > needs-reset-on-resume and has-transaction-translator. > To fix this issue move setting hcd->has_tt to the probe and > move pdata->reset_on_resume to the private data. > Signed-off-by: Alban Bedel > --- > drivers/usb/host/ehci-platform.c | 13 +++++++++---- > 1 file changed, 9 insertions(+), 4 deletions(-) > diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c > index 2593def..40d029e 100644 > --- a/drivers/usb/host/ehci-platform.c > +++ b/drivers/usb/host/ehci-platform.c > @@ -45,6 +45,7 @@ struct ehci_platform_priv { > struct reset_control *rst; > struct phy **phys; > int num_phys; > + bool reset_on_resume; > }; > > static const char hcd_name[] = "ehci-platform"; [...] > @@ -193,11 +193,11 @@ static int ehci_platform_probe(struct platform_device *dev) > > if (of_property_read_bool(dev->dev.of_node, > "needs-reset-on-resume")) > - pdata->reset_on_resume = 1; > + priv->reset_on_resume = 1; 'true' since the typi is 'bool'. [...] MBR, Sergei -- 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/