From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752139AbbE0JF2 (ORCPT ); Wed, 27 May 2015 05:05:28 -0400 Received: from mail-pd0-f170.google.com ([209.85.192.170]:35921 "EHLO mail-pd0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751003AbbE0JFX (ORCPT ); Wed, 27 May 2015 05:05:23 -0400 Date: Wed, 27 May 2015 14:35:13 +0530 From: Sudip Mukherjee To: Heikki Krogerus Cc: Greg KH , Tal Shorer , Sasha Levin , USB list , "" , David Cohen , Felipe Balbi , Lu Baolu Subject: Re: [PATCH] usb: ulpi: don't register drivers if bus doesn't exist Message-ID: <20150527090449.GA29300@sudip-PC> References: <1432150406-20550-1-git-send-email-sasha.levin@oracle.com> <20150524071948.GA20923@kroah.com> <20150524080940.GA4033@sudip-PC> <20150525114010.GA30679@kuha.fi.intel.com> <20150525161312.GB9772@kroah.com> <20150527083933.GA13844@kuha.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150527083933.GA13844@kuha.fi.intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 27, 2015 at 11:39:33AM +0300, Heikki Krogerus wrote: > Hi Greg, > > I can appreciate now that fixing the core problem like I2C did is > wrong, but I still feel that the driver core should provide something > like the helper for checking if the bus was registered already or not. > Otherwise all the bus drivers should really have a variable like Sudip > suggested for checking it, but that would be boilerplate, no? There might have been another way. There was a function called find_bus() but it is under #if 0 , it used to find for a registered bus with its name and NULL if not registered. regards sudip > > Thanks, > > -- > heikki