public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ian Abbott <abbotti@mev.co.uk>
To: H Hartley Sweeten <hartleys@visionengravers.com>
Cc: Ian Abbott <ian.abbott@mev.co.uk>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
	"fmhess@users.sourceforge.net" <fmhess@users.sourceforge.net>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Subject: Re: [PATCH] staging: comedi: cleanup all the comedi_driver 'detach' functions
Date: Fri, 18 May 2012 18:48:07 +0100	[thread overview]
Message-ID: <4FB68B57.7040404@mev.co.uk> (raw)
In-Reply-To: <ADE657CA350FB648AAC2C43247A983F0020698AE1272@AUSP01VMBX24.collaborationhost.net>

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         )=-

  reply	other threads:[~2012-05-18 17:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-18  0:11 [PATCH] staging: comedi: cleanup all the comedi_driver 'detach' functions H Hartley Sweeten
2012-05-18 10:23 ` Ian Abbott
2012-05-18 16:56   ` H Hartley Sweeten
2012-05-18 17:48     ` Ian Abbott [this message]
2012-05-18 17:52       ` H Hartley Sweeten
2012-05-19  6:48         ` Ian Abbott
2012-05-19  0:32 ` Greg KH
2012-05-19  6:42   ` Ian Abbott

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=4FB68B57.7040404@mev.co.uk \
    --to=abbotti@mev.co.uk \
    --cc=devel@driverdev.osuosl.org \
    --cc=fmhess@users.sourceforge.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=hartleys@visionengravers.com \
    --cc=ian.abbott@mev.co.uk \
    --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