From patchwork Sat Mar 12 22:39:56 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Green X-Patchwork-Id: 527 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:43:22 -0000 Delivered-To: patches@linaro.org Received: by 10.224.45.75 with SMTP id d11cs13580qaf; Sat, 12 Mar 2011 14:40:01 -0800 (PST) Received: by 10.216.62.137 with SMTP id y9mr827762wec.107.1299969600504; Sat, 12 Mar 2011 14:40:00 -0800 (PST) Received: from mail-wy0-f178.google.com (mail-wy0-f178.google.com [74.125.82.178]) by mx.google.com with ESMTPS id o2si10961890wer.68.2011.03.12.14.39.58 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 12 Mar 2011 14:39:59 -0800 (PST) Received-SPF: pass (google.com: domain of andy.warmcat.com@googlemail.com designates 74.125.82.178 as permitted sender) client-ip=74.125.82.178; Authentication-Results: mx.google.com; spf=pass (google.com: domain of andy.warmcat.com@googlemail.com designates 74.125.82.178 as permitted sender) smtp.mail=andy.warmcat.com@googlemail.com; dkim=pass (test mode) header.i=@googlemail.com Received: by wyj26 with SMTP id 26so4059118wyj.37 for ; Sat, 12 Mar 2011 14:39:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:sender:from:subject:to:cc:date:message-id :in-reply-to:references:user-agent:mime-version:content-type :content-transfer-encoding; bh=6TJ8mMDfuf5XsL9quAg5qxB1xaFtw7qvICzqxq21oHM=; b=VbW2HWUvUxcmURuMmF74/ivm47NmT63DfSdMAfl+l3FiCusMm9J7phQM82+CKxYQj8 bY6IHgceXqOYM+qzwiLKA/4553h9ZadJF6a7gGfSjaHa3K35EULA+n0kjBa8LEHbdsZo D0xNiMcYAa1IQkB+x2lNcL77LdkrHT3ozpSJU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:from:subject:to:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; b=Fk0rN/R6qDTChycVBfsw++RDqsFWuUHaMrO6HKrW9FY0uKVcMmn1dEv7uNCj8l/fHz YFY7NmvGiqE2PilW62mwsr4Jczo6DTMOEZziATkZCAjSthoz1wsnttWtd574e6lCW6T9 IUEeZt6k5AEfMvq15aQ3glnfz2n1gIV+NF6y4= Received: by 10.227.16.98 with SMTP id n34mr3724715wba.31.1299969598636; Sat, 12 Mar 2011 14:39:58 -0800 (PST) Received: from otae.warmcat.com (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id bd8sm4689834wbb.19.2011.03.12.14.39.57 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 12 Mar 2011 14:39:58 -0800 (PST) Sender: Andy Green From: Andy Green Subject: [RFC PATCH 1/3] USB HOST CORE:probed devices collect any platform_data waiting for them To: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Cc: patches@linaro.org, Andy Green Date: Sat, 12 Mar 2011 22:39:56 +0000 Message-ID: <20110312223956.27344.88916.stgit@otae.warmcat.com> In-Reply-To: <20110312223643.27344.72406.stgit@otae.warmcat.com> References: <20110312223643.27344.72406.stgit@otae.warmcat.com> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 This causes all usb devices created during USB probe to check with the aysnc platform_data api to see if they should get tagged with waiting platform data based on their device path. Signed-off-by: Andy Green --- drivers/usb/core/usb.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index 079cb57..03d9049 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -444,6 +445,8 @@ struct usb_device *usb_alloc_dev(struct usb_device *parent, dev->parent = parent; INIT_LIST_HEAD(&dev->filelist); + platform_async_platform_data_attach(&dev->dev); + #ifdef CONFIG_PM pm_runtime_set_autosuspend_delay(&dev->dev, usb_autosuspend_delay * 1000);