lkml.org 
[lkml]   [2010]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] staging:comedi: Fixed coding convention issues.
From
Date
On Thu, 2010-06-17 at 15:51 -0700, Greg KH wrote:
> On Sat, Jun 12, 2010 at 10:30:50PM -0700, Joe Perches wrote:
> > On Sat, 2010-06-12 at 22:07 -0700, Joe Perches wrote:
> > > 2: Create some comedi logging functions or macros like:
> > > comedi_<level>(fmt, arg...) (ie: comedi_info, comedi_err, etc)
> > > where "comedi:" is always prefixed and an
> > > optional #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> > > could be used.

> I would prefer the conversion of everything over to the dev_printk()
> versions instead of creating a new macro for every individual subsystem.
> That way you get the advantage of logging everything in the common
> format and the dynamic debug functionality as well.

What I posted has dynamic_debug.

+#elif defined(CONFIG_DYNAMIC_DEBUG)
+/* dynamic_pr_debug() uses pr_fmt() internally so we don't need it here */
+#define comedi_debug(fmt, ...) \
+ dynamic_pr_debug(fmt, ##__VA_ARGS__)

As far as I know, comedi doesn't always take a struct device *.
I believe it's only used when there's a DMA.

In struct comedi_device, there are two struct device *'s.

struct device *class_dev;
...
struct device *hw_dev;




\
 
 \ /
  Last update: 2010-06-18 01:19    [W:0.072 / U:0.852 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site