From patchwork Fri Jun 17 06:26:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 70284 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp126554qgy; Thu, 16 Jun 2016 23:29:14 -0700 (PDT) X-Received: by 10.98.210.66 with SMTP id c63mr621648pfg.25.1466144954326; Thu, 16 Jun 2016 23:29:14 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id b188si10638305pfa.90.2016.06.16.23.29.14 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Jun 2016 23:29:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1bDnGN-00036M-Aa; Fri, 17 Jun 2016 06:28:19 +0000 Received: from mailout4.w1.samsung.com ([210.118.77.14]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1bDnFd-0002Zh-SX for linux-arm-kernel@lists.infradead.org; Fri, 17 Jun 2016 06:27:34 +0000 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O8W00053KLEEF90@mailout4.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 17 Jun 2016 07:27:14 +0100 (BST) X-AuditID: cbfec7f4-f796c6d000001486-c8-576398425d89 Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 4F.83.05254.24893675; Fri, 17 Jun 2016 07:27:14 +0100 (BST) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O8W00HUZKL21910@eusync4.samsung.com>; Fri, 17 Jun 2016 07:27:14 +0100 (BST) From: Marek Szyprowski To: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 07/10] driver core: Add support for links to already probed drivers Date: Fri, 17 Jun 2016 08:26:57 +0200 Message-id: <1466144820-6286-8-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1466144820-6286-1-git-send-email-m.szyprowski@samsung.com> References: <1466144820-6286-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrHLMWRmVeSWpSXmKPExsVy+t/xa7pOM5LDDc7uNbDYOGM9q8XUh0/Y LJoXr2ezmHR/AovFgv3WFp2zN7BbvH5haNH/+DWzxabH11gtLu+aw2bxufcIo8WM8/uYLNYe uctuceb0JVaL42vDHfg9nhycx+SxaVUnm8eda3vYPPbPXcPusXlJvcfkG8sZPbZcbWfx6Nuy itHj8ya5AM4oLpuU1JzMstQifbsEroz181pYC2azVRxqf8DUwDiFtYuRk0NCwETi3bZHULaY xIV769m6GLk4hASWMko8eXOfBcJpYpL4se4zG0gVm4ChRNfbLrAqEYGVjBLb9uxjBnGYBRYy SzSvaWYBqRIWiJC4MaGJEcRmEVCVWPv+CNgOXgF3idOrPzJB7JOTOHlsMlicU8BD4sWtH2C9 QkA1uw6fYp7AyLuAkWEVo2hqaXJBcVJ6rqFecWJucWleul5yfu4mRkgof9nBuPiY1SFGAQ5G JR7eFaLJ4UKsiWXFlbmHGCU4mJVEeDWnA4V4UxIrq1KL8uOLSnNSiw8xSnOwKInzzt31PkRI ID2xJDU7NbUgtQgmy8TBKdXAaC/AJNK268DLrJW2mi8eVYgmnZr3UvJMzturXfdvZqworl3c H+Fscaz8adDmvx7nbvif4VV+ldH1WNiPY9e7CNZo6VlmxtbNq49q+wuu8Nwa8f2HiqxAhMXv Z3ODI/LfME3vsLuavlRQU7/rtGRk++sdNToza6z7lxxaxbJRutDzpjWb3txaJZbijERDLeai 4kQAVPjulGECAAA= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160616_232734_102602_FCFA1507 X-CRM114-Status: GOOD ( 13.62 ) X-Spam-Score: -8.3 (--------) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-8.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [210.118.77.14 listed in wl.mailspike.net] -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [210.118.77.14 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.4 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Greg Kroah-Hartman , Joerg Roedel , "Rafael J. Wysocki" , Ulf Hansson , Inki Dae , Kukjin Kim , Mark Brown , Marek Szyprowski MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Set proper link state if link is created between already probed supplier device and to be probed consumer device. Signed-off-by: Marek Szyprowski --- drivers/base/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 1.9.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/drivers/base/core.c b/drivers/base/core.c index 4e778539b750..d9c5c5542a6b 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -125,7 +125,9 @@ struct devlink *device_link_add(struct device *consumer, link->flags = flags; link->status = (flags & DEVICE_LINK_PROBE_TIME) ? - DEVICE_LINK_CONSUMER_PROBE : DEVICE_LINK_DORMANT; + DEVICE_LINK_CONSUMER_PROBE : + (supplier->driver ? DEVICE_LINK_AVAILABLE : + DEVICE_LINK_DORMANT); spin_lock_init(&link->lock); /*