Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756371Ab2JQQC2 (ORCPT ); Wed, 17 Oct 2012 12:02:28 -0400 Received: from mail-wi0-f172.google.com ([209.85.212.172]:37840 "EHLO mail-wi0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753267Ab2JQQC1 (ORCPT ); Wed, 17 Oct 2012 12:02:27 -0400 MIME-Version: 1.0 In-Reply-To: References: Date: Thu, 18 Oct 2012 00:02:24 +0800 Message-ID: Subject: Re: [Q] reprobe deferred-probing drivers From: Ming Lei To: Guennadi Liakhovetski Cc: linux-kernel@vger.kernel.org, Linux Media Mailing List , Greg Kroah-Hartman Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 951 Lines: 29 On Wed, Oct 17, 2012 at 4:43 PM, Guennadi Liakhovetski wrote: > On Wed, 17 Oct 2012, Guennadi Liakhovetski wrote: > >> Hi >> >> I've got a situation, for which I currently don't have a (good) solution. > > Ok, right, would it be acceptable to just do something like > > if (dev->parent) > device_lock(dev->parent); > device_release_driver(dev); > device_attach(dev); The above should be OK for your purpose, and looks some other deferred-probe devices may need this handling too. But I am wondering how you could get the pointer of device A for releasing driver in device B's remove()? Thanks, -- Ming Lei -- 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/