From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754037Ab0GVASE (ORCPT ); Wed, 21 Jul 2010 20:18:04 -0400 Received: from cantor2.suse.de ([195.135.220.15]:60157 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751441Ab0GVAR7 (ORCPT ); Wed, 21 Jul 2010 20:17:59 -0400 Date: Wed, 21 Jul 2010 17:07:37 -0700 From: Greg KH To: Grant Likely Cc: Stephen Rothwell , Michal Simek , Benjamin Herrenschmidt , linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org, microblaze-uclinux@itee.uq.edu.au, sparclinux@vger.kernel.org, David Miller Subject: Re: [PATCH 1/5] drivercore/of: Add OF style matching to platform bus Message-ID: <20100722000737.GA14249@suse.de> References: <20100721232817.7782.23410.stgit@angua> <20100721233954.7782.81154.stgit@angua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100721233954.7782.81154.stgit@angua> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 21, 2010 at 05:39:54PM -0600, Grant Likely wrote: > As part of the merge between platform bus and of_platform bus, add the > ability to do of-style matching to the platform bus. > > Signed-off-by: Grant Likely > CC: Greg Kroah-Hartman > CC: Michal Simek > CC: Grant Likely > CC: Benjamin Herrenschmidt > CC: Stephen Rothwell > CC: linux-kernel@vger.kernel.org > CC: microblaze-uclinux@itee.uq.edu.au > CC: linuxppc-dev@ozlabs.org > CC: devicetree-discuss@lists.ozlabs.org > --- > drivers/base/platform.c | 5 +++++ > 1 files changed, 5 insertions(+), 0 deletions(-) > > diff --git a/drivers/base/platform.c b/drivers/base/platform.c > index 4d99c8b..6a9b3dd 100644 > --- a/drivers/base/platform.c > +++ b/drivers/base/platform.c > @@ -12,6 +12,7 @@ > > #include > #include > +#include > #include > #include > #include > @@ -673,6 +674,10 @@ static int platform_match(struct device *dev, struct device_driver *drv) > struct platform_device *pdev = to_platform_device(dev); > struct platform_driver *pdrv = to_platform_driver(drv); > > + /* Attempt an OF style match first */ > + if (of_driver_match_device(dev, drv)) > + return 1; > + > /* match against the id table first */ I think you need to also change this comment, you can't have two "firsts" :) If you do that, feel free to add an: Acked-by: Greg Kroah-Hartman to the patch. thanks, greg k-h