lkml.org 
[lkml]   [2012]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] staging: comedi: cleanup all the comedi_driver 'detach' functions
On 2012-05-18 17:56, H Hartley Sweeten wrote:
> Can you test this patch and let me know what the resulting output
> is? You may need to change the dev_dbg to dev_info or something
> else if you don't have the proper kernel debugging enabled.

> diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c
> index 1c3d638..d6bb1f9 100644
> --- a/drivers/staging/comedi/drivers.c
> +++ b/drivers/staging/comedi/drivers.c
> @@ -91,11 +91,14 @@ static void cleanup_device(struct comedi_device *dev)
> static void __comedi_device_detach(struct comedi_device *dev)
> {
> dev->attached = 0;
> - if (dev->driver)
> + if (dev->driver) {
> dev->driver->detach(dev);
> - else
> - printk(KERN_WARNING
> + dev_dbg(dev->class_dev, "%s detached\n",
> + dev->driver->driver_name);
> + } else {
> + dev_warn(dev->class_dev,
> "BUG: dev->driver=NULL in comedi_device_detach()\n");
> + }
> cleanup_device(dev);
> }

It works, but I'd prefer dev_info over dev_dbg.

--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
-=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-


\
 
 \ /
  Last update: 2012-05-18 20:21    [W:0.156 / U:0.436 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site