lkml.org 
[lkml]   [2013]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] lp: implement proper detach function for parport_driver lp
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


\
 
 \ /
  Last update: 2013-06-03 23:41    [W:0.136 / U:0.472 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site