From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754001AbbDHOdY (ORCPT ); Wed, 8 Apr 2015 10:33:24 -0400 Received: from mail-pd0-f170.google.com ([209.85.192.170]:36038 "EHLO mail-pd0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751524AbbDHOdW (ORCPT ); Wed, 8 Apr 2015 10:33:22 -0400 Date: Wed, 8 Apr 2015 20:03:13 +0530 From: Sudip Mukherjee To: Dan Carpenter Cc: Arnd Bergmann , Greg Kroah-Hartman , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] parport: return of attach and parport_register_driver Message-ID: <20150408143313.GA12753@sudip-PC> References: <1428499817-12065-1-git-send-email-sudipm.mukherjee@gmail.com> <20150408141754.GT16501@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150408141754.GT16501@mwanda> 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, Apr 08, 2015 at 05:17:54PM +0300, Dan Carpenter wrote: > On Wed, Apr 08, 2015 at 07:00:16PM +0530, Sudip Mukherjee wrote: > > + if (attached) { > > + list_add(&drv->list, &drivers); > > + ret = 0; > > + } > > I still think it would be nicer to create a do_attach() wrapper like I > said earlier. yes, after seeing your this code beside mine, your code looks more tidy than mine. sorry, for not listening to you on the first place. > > mutex_unlock(®istration_lock); > > if (!attached) > return -ENODEV; > return 0; > > The attach_driver_chain() function needs to be updated as well or it > will break. oops, i missed that function. but i didn't get any error? ok, this is for those parallel ports which registers after our driver registers. But Greg wants to have parallel port changed into the device model, so should i start with that task or shall we finalize this series so that it can be applied for the timebeing? regards sudip > > regards, > dan carpenter >