Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758490AbZDQTHx (ORCPT ); Fri, 17 Apr 2009 15:07:53 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753635AbZDQTHY (ORCPT ); Fri, 17 Apr 2009 15:07:24 -0400 Received: from kroah.org ([198.145.64.141]:51194 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751827AbZDQTHX (ORCPT ); Fri, 17 Apr 2009 15:07:23 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Ming Lei , Greg Kroah-Hartman Subject: [PATCH 02/10] driver core: fix driver_match_device Date: Fri, 17 Apr 2009 12:04:26 -0700 Message-Id: <1239995074-4065-2-git-send-email-gregkh@suse.de> X-Mailer: git-send-email 1.6.2.3 In-Reply-To: <20090417190144.GB3548@kroah.com> References: <20090417190144.GB3548@kroah.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1275 Lines: 37 From: Ming Lei This patch fixes a bug introduced in commit 49b420a13ff95b449947181190b08367348e3e1b. If a instance of bus_type doesn't have .match method, all .probe of drivers in the bus should be called, or else the .probe have not a chance to be called. Signed-off-by: Ming Lei Reported-by: Guennadi Liakhovetski Signed-off-by: Greg Kroah-Hartman --- drivers/base/base.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/base/base.h b/drivers/base/base.h index ddc9749..b528145 100644 --- a/drivers/base/base.h +++ b/drivers/base/base.h @@ -115,7 +115,7 @@ extern int driver_probe_device(struct device_driver *drv, struct device *dev); static inline int driver_match_device(struct device_driver *drv, struct device *dev) { - return drv->bus->match && drv->bus->match(dev, drv); + return drv->bus->match ? drv->bus->match(dev, drv) : 1; } extern void sysdev_shutdown(void); -- 1.6.2 -- 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/