From: Greg Kroah-Hartman <greg@kroah.com>
To: Hannes Weisbach <hannes_weisbach@gmx.net>
Cc: Arnd Bergmann <arnd@arndb.de>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lp: implement proper detach function for parport_driver lp
Date: Mon, 3 Jun 2013 14:08:16 -0700 [thread overview]
Message-ID: <20130603210816.GA22677@kroah.com> (raw)
In-Reply-To: <2009349A-75FD-4D5F-8F25-F8FD78F1A5D8@gmx.net>
On Sat, Jun 01, 2013 at 10:02:21PM +0200, Hannes Weisbach wrote:
> From: Hannes Weisbach <hannes_weisbach@gmx.net>
>
> The lp pardevice driver does not have a proper detach function. Consequently, parport_unregister_device() is not called when the underlying parport driver calls parport_remove_port(). As a result, the ref count of the parport driver's module does not go to zero and the driver module cannot be unloaded.
> The attached patch unregisters all lp pardevices which are on the to-be-detached parport.
Please wrap your changelog comments at 72 columns or so.
> Signed-off-by: Hannes Weisbach <hannes_weisbach@gmx.net>
> ---
> Granted, for normal parport drivers this is usually not an issue,
> because the device does not go away. However, I am currently writing a
> Linux device driver for a USB to parallel port converter [0] and
> therefore need proper detaching. Additionally, the wrong ref count
> keeps me from simply rmmod my driver and insmod a new version while
> developing and testing.
Really? We already have a usb to parallel port driver in the kernel
tree that seems to work just fine. It's been there since the 2.3 kernel
days, so either it has the same problem, or your driver is doing
something odd.
Can you test the in-kernel driver and let me know if it has the same
problem?
thanks,
greg k-h
next prev parent reply other threads:[~2013-06-03 21:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-01 20:02 [PATCH] lp: implement proper detach function for parport_driver lp Hannes Weisbach
2013-06-03 21:08 ` Greg Kroah-Hartman [this message]
2013-06-19 17:04 ` Hannes Weisbach
2013-06-19 18:32 ` Greg Kroah-Hartman
2013-06-20 8:25 ` Hannes Weisbach
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130603210816.GA22677@kroah.com \
--to=greg@kroah.com \
--cc=arnd@arndb.de \
--cc=hannes_weisbach@gmx.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox