From patchwork Mon Dec 23 16:23:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pawel Moll X-Patchwork-Id: 3397381 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1578AC0D4A for ; Mon, 23 Dec 2013 16:46:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0119E20523 for ; Mon, 23 Dec 2013 16:46:17 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AD5D920520 for ; Mon, 23 Dec 2013 16:46:15 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vv8J5-00089x-Bi; Mon, 23 Dec 2013 16:24:39 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vv8J2-0002i0-PP; Mon, 23 Dec 2013 16:24:36 +0000 Received: from service87.mimecast.com ([91.220.42.44]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vv8Is-0002cO-7H for linux-arm-kernel@lists.infradead.org; Mon, 23 Dec 2013 16:24:30 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Mon, 23 Dec 2013 16:24:03 +0000 Received: from hornet.Cambridge.Arm.com ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 23 Dec 2013 16:24:02 +0000 From: Pawel Moll To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [RFC 05/18] driver core: Do not WARN when devres list is not empty at probe time Date: Mon, 23 Dec 2013 16:23:37 +0000 Message-Id: <1387815830-8794-6-git-send-email-pawel.moll@arm.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1387815830-8794-1-git-send-email-pawel.moll@arm.com> References: <1387815830-8794-1-git-send-email-pawel.moll@arm.com> X-OriginalArrivalTime: 23 Dec 2013 16:24:02.0650 (UTC) FILETIME=[64646BA0:01CEFFFB] X-MC-Unique: 113122316240310201 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131223_112426_864117_B5A98FFE X-CRM114-Status: GOOD ( 12.62 ) X-Spam-Score: -2.6 (--) Cc: Jon Medhurst , Samuel Ortiz , Pawel Moll , Greg Kroah-Hartman , arm@kernel.org, Arnd Bergmann , Olof Johansson X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP regmap_init() adds the initialised map to the device resources, which can be then obtained in the driver->probe function in a generic way with dev_reg_regmap(), which makes it independent from underlying hardware interface. This is useful when platform_devices are not simply memory mapped but must use custom way of accessing the registers. Unfortunately the device core WARNs in a situation when probed devices has a non-empty resources list. This patch simply removes this check and doesn't seem to have any side effects. Signed-off-by: Pawel Moll Cc: Greg Kroah-Hartman --- drivers/base/dd.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 0605176..07b8419 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -269,7 +269,6 @@ static int really_probe(struct device *dev, struct device_driver *drv) atomic_inc(&probe_count); pr_debug("bus: '%s': %s: probing driver %s with device %s\n", drv->bus->name, __func__, drv->name, dev_name(dev)); - WARN_ON(!list_empty(&dev->devres_head)); dev->driver = drv;