From: Greg KH <gregkh@suse.de>
To: linux-fbdev@vger.kernel.org
Subject: Re: [PATCH] Add support for SMSC UFX6000/7000 USB display adapters
Date: Fri, 12 Aug 2011 19:34:05 +0000 [thread overview]
Message-ID: <20110812193405.GB10770@suse.de> (raw)
In-Reply-To: <1313150823-2527-1-git-send-email-steve.glendinning@smsc.com>
On Fri, Aug 12, 2011 at 12:06:55PM -0700, Bernie Thompson wrote:
> On Fri, Aug 12, 2011 at 8:56 AM, Greg KH <gregkh@suse.de> wrote:
>
> You can do the same for your calls to pr_debug() and other pr_* calls.
> If you note in the header file for those functions, it suggests that
> drivers should always call the dev_* versions instead of teh "raw" pr_*
> functions, as you do have access to a struct device within your driver.
>
>
> A little background from udlfb: we weren't able to stick with dev_* calls 100%,
> because udlfb needed to survive USB device removal and the freeing of the
> USB-initiated device structure. This is because the framebuffer device needed
> to outlive it if a client was holding on to it. In other words, it's born a
> two-headed beast (usb and fbdev), but the two faces of the device are killed
> off independently based on remaining ref counts. So there are prints in there
> which will fault if converted to dev_* without this in mind.
>
> Because of this, we had originally created our own dl_* wrapper around the pr_
> macros.
>
> Then a later patch initiated by Paul (fbdev maintainer) changed those to
> uncustomized pr_ macros with a goal of uniformity with other drivers. And that
> code is what SMSC started from.
>
> So there's some complexity behind the choices here. It might be good to keep
> common strategies between udlfb and smsc's driver, as the issues to consider
> are the same.
Ok, thanks for the background information, that makes sense.
But for stuff like the usb probe() call, that should always be dev_* as
you really do have a proper pointer. So when you do have a valid struct
device, you should use it.
Although a lot of the pr_info() calls should be downgraded to pr_debug()
I imagine, to keep things from being so noisy.
thanks,
greg k-h
next prev parent reply other threads:[~2011-08-12 19:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-12 12:07 [PATCH] Add support for SMSC UFX6000/7000 USB display adapters Steve Glendinning
2011-08-12 15:56 ` Greg KH
2011-08-12 19:34 ` Greg KH [this message]
2011-08-16 10:17 ` Florian Tobias Schandinat
2011-08-16 16:53 ` Bernie Thompson
2011-08-16 17:32 ` Florian Tobias Schandinat
2011-08-18 14:20 ` Steve Glendinning
2011-09-05 17:07 ` Florian Tobias Schandinat
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=20110812193405.GB10770@suse.de \
--to=gregkh@suse.de \
--cc=linux-fbdev@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.