[PATCH 0/3] Staging: comedi: Checkpatch cleanups in ni_mio_common.c

2014-01-10 Thread Chase Southwood
This patch series fixes several warnings reported by checkpatch.pl in 
ni_mio_common.c of the comedi driver.

Among the issues fixed:
*Many unnecessary braces have been removed.
*Improper indentation has been corrected.
*Extra whitespace before semicolons has been removed.
*Extra whitespace after function pointer name has been removed.

Several checkpatch warnings still remain (mainly 80 character+ line lengths), 
but no new warnings have been introduced, and no functionality changes have 
been made.
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 0/3] Staging: comedi: Checkpatch cleanups in ni_mio_common.c

2014-01-10 Thread Chase Southwood
Oops, left out some of my cover letter.  Here is the amended patchset
cover letter.

On Fri, Jan 10, 2014 at 10:07 PM, Chase Southwood
chase.southw...@yahoo.com wrote:

 This patch series fixes several warnings reported by checkpatch.pl in 
 ni_mio_common.c of the comedi driver.

 Among the issues fixed:
 *Many unnecessary braces have been removed.
 *Improper indentation has been corrected.
 *Extra whitespace before semicolons has been removed.
 *Extra whitespace after function pointer name has been removed.

 Several checkpatch warnings still remain (mainly 80 character+ line lengths), 
 but no new warnings have been introduced, and no functionality changes have 
 been made.


Chase Southwood (3):
Staging: comedi: fix numerous brace coding style issues in ni_mio_common.c.
Staging: comedi: fix indentation coding style issue in ni_mio_common.c.
Staging: comedi: fix extra whitespace style issues in ni_mio_common.c.

drivers/staging/comedi/drivers/ni_mio_common.c | 138 +
1 file changed, 50 insertions(+), 88 deletions(-)
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] Staging: comedi: fix spacing coding style issue in 8255.c.

2014-01-09 Thread Chase Southwood
This patch for 8255.c fixes a spacing warning found by checkpatch.pl.

Signed-off-by: Chase Southwood 
---
 drivers/staging/comedi/drivers/8255.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/comedi/drivers/8255.c 
b/drivers/staging/comedi/drivers/8255.c
index b4009e8..48817f0 100644
--- a/drivers/staging/comedi/drivers/8255.c
+++ b/drivers/staging/comedi/drivers/8255.c
@@ -94,7 +94,7 @@ I/O port base address can be found in the output of 'lspci 
-v'.
 
 struct subdev_8255_private {
unsigned long iobase;
-   int (*io) (int, int, int, unsigned long);
+   int (*io)(int, int, int, unsigned long);
 };
 
 static int subdev_8255_io(int dir, int port, int data, unsigned long iobase)
@@ -262,7 +262,7 @@ static int subdev_8255_cancel(struct comedi_device *dev,
 }
 
 int subdev_8255_init(struct comedi_device *dev, struct comedi_subdevice *s,
-int (*io) (int, int, int, unsigned long),
+int (*io)(int, int, int, unsigned long),
 unsigned long iobase)
 {
struct subdev_8255_private *spriv;
@@ -289,7 +289,7 @@ int subdev_8255_init(struct comedi_device *dev, struct 
comedi_subdevice *s,
 EXPORT_SYMBOL_GPL(subdev_8255_init);
 
 int subdev_8255_init_irq(struct comedi_device *dev, struct comedi_subdevice *s,
-int (*io) (int, int, int, unsigned long),
+int (*io)(int, int, int, unsigned long),
 unsigned long iobase)
 {
int ret;
-- 
1.8.4.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] Staging: comedi: fix spacing coding style issue in 8255.c.

2014-01-09 Thread Chase Southwood
This patch for 8255.c fixes a spacing warning found by checkpatch.pl.

Signed-off-by: Chase Southwood chase.southw...@yahoo.com
---
 drivers/staging/comedi/drivers/8255.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/comedi/drivers/8255.c 
b/drivers/staging/comedi/drivers/8255.c
index b4009e8..48817f0 100644
--- a/drivers/staging/comedi/drivers/8255.c
+++ b/drivers/staging/comedi/drivers/8255.c
@@ -94,7 +94,7 @@ I/O port base address can be found in the output of 'lspci 
-v'.
 
 struct subdev_8255_private {
unsigned long iobase;
-   int (*io) (int, int, int, unsigned long);
+   int (*io)(int, int, int, unsigned long);
 };
 
 static int subdev_8255_io(int dir, int port, int data, unsigned long iobase)
@@ -262,7 +262,7 @@ static int subdev_8255_cancel(struct comedi_device *dev,
 }
 
 int subdev_8255_init(struct comedi_device *dev, struct comedi_subdevice *s,
-int (*io) (int, int, int, unsigned long),
+int (*io)(int, int, int, unsigned long),
 unsigned long iobase)
 {
struct subdev_8255_private *spriv;
@@ -289,7 +289,7 @@ int subdev_8255_init(struct comedi_device *dev, struct 
comedi_subdevice *s,
 EXPORT_SYMBOL_GPL(subdev_8255_init);
 
 int subdev_8255_init_irq(struct comedi_device *dev, struct comedi_subdevice *s,
-int (*io) (int, int, int, unsigned long),
+int (*io)(int, int, int, unsigned long),
 unsigned long iobase)
 {
int ret;
-- 
1.8.4.2

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2] Staging: comedi: fix spacing/style problem in das1800.c (and das6402.c)

2014-01-05 Thread Chase Southwood
This patch fixes a style issue regarding asterisk placement in
das1800.c and das6402.c found by checkpatch.pl.

Signed-off-by: Chase Southwood 
---

2: Added fix for identical style problem in das6402.c, previous version only 
changed das1800.c.

 drivers/staging/comedi/drivers/das1800.c | 2 +-
 drivers/staging/comedi/drivers/das6402.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/drivers/das1800.c 
b/drivers/staging/comedi/drivers/das1800.c
index 165bdfd..320d95a 100644
--- a/drivers/staging/comedi/drivers/das1800.c
+++ b/drivers/staging/comedi/drivers/das1800.c
@@ -459,7 +459,7 @@ static inline uint16_t munge_bipolar_sample(const struct 
comedi_device *dev,
return sample;
 }
 
-static void munge_data(struct comedi_device *dev, uint16_t * array,
+static void munge_data(struct comedi_device *dev, uint16_t *array,
   unsigned int num_elements)
 {
unsigned int i;
diff --git a/drivers/staging/comedi/drivers/das6402.c 
b/drivers/staging/comedi/drivers/das6402.c
index e80c19a8..43027ee 100644
--- a/drivers/staging/comedi/drivers/das6402.c
+++ b/drivers/staging/comedi/drivers/das6402.c
@@ -202,7 +202,7 @@ static int das6402_ai_cancel(struct comedi_device *dev,
 
 #ifdef unused
 static int das6402_ai_mode2(struct comedi_device *dev,
-   struct comedi_subdevice *s, comedi_trig * it)
+   struct comedi_subdevice *s, comedi_trig *it)
 {
struct das6402_private *devpriv = dev->private;
 
-- 
1.8.4.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2] Staging: comedi: fix spacing/style problem in das1800.c (and das6402.c)

2014-01-05 Thread Chase Southwood
This patch fixes a style issue regarding asterisk placement in
das1800.c and das6402.c found by checkpatch.pl.

Signed-off-by: Chase Southwood chase.southw...@yahoo.com
---

2: Added fix for identical style problem in das6402.c, previous version only 
changed das1800.c.

 drivers/staging/comedi/drivers/das1800.c | 2 +-
 drivers/staging/comedi/drivers/das6402.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/drivers/das1800.c 
b/drivers/staging/comedi/drivers/das1800.c
index 165bdfd..320d95a 100644
--- a/drivers/staging/comedi/drivers/das1800.c
+++ b/drivers/staging/comedi/drivers/das1800.c
@@ -459,7 +459,7 @@ static inline uint16_t munge_bipolar_sample(const struct 
comedi_device *dev,
return sample;
 }
 
-static void munge_data(struct comedi_device *dev, uint16_t * array,
+static void munge_data(struct comedi_device *dev, uint16_t *array,
   unsigned int num_elements)
 {
unsigned int i;
diff --git a/drivers/staging/comedi/drivers/das6402.c 
b/drivers/staging/comedi/drivers/das6402.c
index e80c19a8..43027ee 100644
--- a/drivers/staging/comedi/drivers/das6402.c
+++ b/drivers/staging/comedi/drivers/das6402.c
@@ -202,7 +202,7 @@ static int das6402_ai_cancel(struct comedi_device *dev,
 
 #ifdef unused
 static int das6402_ai_mode2(struct comedi_device *dev,
-   struct comedi_subdevice *s, comedi_trig * it)
+   struct comedi_subdevice *s, comedi_trig *it)
 {
struct das6402_private *devpriv = dev-private;
 
-- 
1.8.4.2

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] Staging: comedi: fix spacing/style problem in das1800.c

2014-01-02 Thread Chase Southwood
This is a patch to the das1800.c file that fixes a style issue found by
checkpatch.pl.

Signed-off-by: Chase Southwood 
---
 drivers/staging/comedi/drivers/das1800.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers/das1800.c 
b/drivers/staging/comedi/drivers/das1800.c
index 165bdfd..320d95a 100644
--- a/drivers/staging/comedi/drivers/das1800.c
+++ b/drivers/staging/comedi/drivers/das1800.c
@@ -459,7 +459,7 @@ static inline uint16_t munge_bipolar_sample(const struct 
comedi_device *dev,
return sample;
 }
 
-static void munge_data(struct comedi_device *dev, uint16_t * array,
+static void munge_data(struct comedi_device *dev, uint16_t *array,
   unsigned int num_elements)
 {
unsigned int i;
-- 
1.8.4.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] Staging: comedi: fix spacing/style problem in das1800.c

2014-01-02 Thread Chase Southwood
This is a patch to the das1800.c file that fixes a style issue found by
checkpatch.pl.

Signed-off-by: Chase Southwood chase.southw...@yahoo.com
---
 drivers/staging/comedi/drivers/das1800.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers/das1800.c 
b/drivers/staging/comedi/drivers/das1800.c
index 165bdfd..320d95a 100644
--- a/drivers/staging/comedi/drivers/das1800.c
+++ b/drivers/staging/comedi/drivers/das1800.c
@@ -459,7 +459,7 @@ static inline uint16_t munge_bipolar_sample(const struct 
comedi_device *dev,
return sample;
 }
 
-static void munge_data(struct comedi_device *dev, uint16_t * array,
+static void munge_data(struct comedi_device *dev, uint16_t *array,
   unsigned int num_elements)
 {
unsigned int i;
-- 
1.8.4.2

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH][Resend] Staging: comedi: replace printk() calls with dev_dbg() in pcmmio.c

2014-01-01 Thread Chase Southwood
From: Chase Southwood 

This is a patch for pcmmio.c that changes several printk() calls to dev_dbg() 
or dev_err() to fix checkpatch.pl warnings.  Patched from 3.13-rc6.

Signed-off-by: Chase Southwood 
---
 drivers/staging/comedi/drivers/pcmmio.c | 23 +--
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/comedi/drivers/pcmmio.c 
b/drivers/staging/comedi/drivers/pcmmio.c
index 14cee3a..8a567c9 100644
--- a/drivers/staging/comedi/drivers/pcmmio.c
+++ b/drivers/staging/comedi/drivers/pcmmio.c
@@ -252,7 +252,8 @@ static int pcmmio_dio_insn_bits(struct comedi_device *dev,
 
 #ifdef DAMMIT_ITS_BROKEN
/* DEBUG */
-   printk(KERN_DEBUG "write mask: %08x  data: %08x\n", data[0], data[1]);
+   dev_dbg(dev->class_dev, "write mask: %08x  data: %08x\n",
+   data[0], data[1]);
 #endif
 
s->state = 0;
@@ -273,10 +274,11 @@ static int pcmmio_dio_insn_bits(struct comedi_device *dev,
 
 #ifdef DAMMIT_ITS_BROKEN
/* DEBUG */
-   printk
-   (KERN_DEBUG "byte %d wmb %02x db %02x offset %02d io %04x,"
-" data_in %02x ", byte_no, (unsigned)write_mask_byte,
-(unsigned)data_byte, offset, ioaddr, (unsigned)byte);
+   dev_dbg(dev->class_dev,
+   "byte %d wmb %02x db %02x offset %02d io %04x 
data_in %02x ",
+   byte_no, (unsigned)write_mask_byte,
+   (unsigned)data_byte, offset, ioaddr,
+   (unsigned)byte);
 #endif
 
if (write_mask_byte) {
@@ -293,7 +295,7 @@ static int pcmmio_dio_insn_bits(struct comedi_device *dev,
}
 #ifdef DAMMIT_ITS_BROKEN
/* DEBUG */
-   printk(KERN_DEBUG "data_out_byte %02x\n", (unsigned)byte);
+   dev_dbg(dev->class_dev, "data_out_byte %02x\n", (unsigned)byte);
 #endif
/* save the digital input lines for this byte.. */
s->state |= ((unsigned int)byte) << offset;
@@ -304,7 +306,8 @@ static int pcmmio_dio_insn_bits(struct comedi_device *dev,
 
 #ifdef DAMMIT_ITS_BROKEN
/* DEBUG */
-   printk(KERN_DEBUG "s->state %08x data_out %08x\n", s->state, data[1]);
+   dev_dbg(dev->class_dev, "s->state %08x data_out %08x\n",
+   s->state, data[1]);
 #endif
 
return insn->n;
@@ -505,8 +508,8 @@ static irqreturn_t interrupt_pcmmio(int irq, void *d)
 * TODO here: dispatch io lines to subdevs
 * with commands..
 */
-   printk
-   (KERN_DEBUG "got edge detect interrupt %d 
asic %d which_chans: %06x\n",
+   dev_dbg(dev->class_dev,
+"got edge detect interrupt %d asic %d 
which_chans: %06x\n",
 irq, asic, triggered);
for (i = 2; i < dev->n_subdevices; i++) {
s = >subdevices[i];
@@ -1021,7 +1024,7 @@ static int pcmmio_attach(struct comedi_device *dev, 
struct comedi_devconfig *it)
kcalloc(n_subdevs, sizeof(struct pcmmio_subdev_private),
GFP_KERNEL);
if (!devpriv->sprivs) {
-   printk(KERN_ERR "comedi%d: cannot allocate subdevice private 
data structures\n",
+   dev_err(dev->class_dev, "comedi%d: cannot allocate subdevice 
private data structures\n",
dev->minor);
return -ENOMEM;
}
-- 
1.8.4.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH][Resend] Staging: comedi: replace printk() calls with dev_dbg() in pcmmio.c

2014-01-01 Thread Chase Southwood
From: Chase Southwood chase.southw...@yahoo.com

This is a patch for pcmmio.c that changes several printk() calls to dev_dbg() 
or dev_err() to fix checkpatch.pl warnings.  Patched from 3.13-rc6.

Signed-off-by: Chase Southwood chase.southw...@yahoo.com
---
 drivers/staging/comedi/drivers/pcmmio.c | 23 +--
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/comedi/drivers/pcmmio.c 
b/drivers/staging/comedi/drivers/pcmmio.c
index 14cee3a..8a567c9 100644
--- a/drivers/staging/comedi/drivers/pcmmio.c
+++ b/drivers/staging/comedi/drivers/pcmmio.c
@@ -252,7 +252,8 @@ static int pcmmio_dio_insn_bits(struct comedi_device *dev,
 
 #ifdef DAMMIT_ITS_BROKEN
/* DEBUG */
-   printk(KERN_DEBUG write mask: %08x  data: %08x\n, data[0], data[1]);
+   dev_dbg(dev-class_dev, write mask: %08x  data: %08x\n,
+   data[0], data[1]);
 #endif
 
s-state = 0;
@@ -273,10 +274,11 @@ static int pcmmio_dio_insn_bits(struct comedi_device *dev,
 
 #ifdef DAMMIT_ITS_BROKEN
/* DEBUG */
-   printk
-   (KERN_DEBUG byte %d wmb %02x db %02x offset %02d io %04x,
- data_in %02x , byte_no, (unsigned)write_mask_byte,
-(unsigned)data_byte, offset, ioaddr, (unsigned)byte);
+   dev_dbg(dev-class_dev,
+   byte %d wmb %02x db %02x offset %02d io %04x 
data_in %02x ,
+   byte_no, (unsigned)write_mask_byte,
+   (unsigned)data_byte, offset, ioaddr,
+   (unsigned)byte);
 #endif
 
if (write_mask_byte) {
@@ -293,7 +295,7 @@ static int pcmmio_dio_insn_bits(struct comedi_device *dev,
}
 #ifdef DAMMIT_ITS_BROKEN
/* DEBUG */
-   printk(KERN_DEBUG data_out_byte %02x\n, (unsigned)byte);
+   dev_dbg(dev-class_dev, data_out_byte %02x\n, (unsigned)byte);
 #endif
/* save the digital input lines for this byte.. */
s-state |= ((unsigned int)byte)  offset;
@@ -304,7 +306,8 @@ static int pcmmio_dio_insn_bits(struct comedi_device *dev,
 
 #ifdef DAMMIT_ITS_BROKEN
/* DEBUG */
-   printk(KERN_DEBUG s-state %08x data_out %08x\n, s-state, data[1]);
+   dev_dbg(dev-class_dev, s-state %08x data_out %08x\n,
+   s-state, data[1]);
 #endif
 
return insn-n;
@@ -505,8 +508,8 @@ static irqreturn_t interrupt_pcmmio(int irq, void *d)
 * TODO here: dispatch io lines to subdevs
 * with commands..
 */
-   printk
-   (KERN_DEBUG got edge detect interrupt %d 
asic %d which_chans: %06x\n,
+   dev_dbg(dev-class_dev,
+got edge detect interrupt %d asic %d 
which_chans: %06x\n,
 irq, asic, triggered);
for (i = 2; i  dev-n_subdevices; i++) {
s = dev-subdevices[i];
@@ -1021,7 +1024,7 @@ static int pcmmio_attach(struct comedi_device *dev, 
struct comedi_devconfig *it)
kcalloc(n_subdevs, sizeof(struct pcmmio_subdev_private),
GFP_KERNEL);
if (!devpriv-sprivs) {
-   printk(KERN_ERR comedi%d: cannot allocate subdevice private 
data structures\n,
+   dev_err(dev-class_dev, comedi%d: cannot allocate subdevice 
private data structures\n,
dev-minor);
return -ENOMEM;
}
-- 
1.8.4.2

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] Staging: comedi: replace printk() calls with dev_dbg() in pcmmio.c

2013-12-28 Thread Chase Southwood
From: Chase Southwood 

This is a patch for pcmmio.c that changes several printk() calls to dev_dbg() 
or dev_err() to fix checkpatch.pl warnings.  Patched from 3.13-rc5.

Signed-off-by: Chase Southwood 
---
 drivers/staging/comedi/drivers/pcmmio.c | 23 +--
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/comedi/drivers/pcmmio.c 
b/drivers/staging/comedi/drivers/pcmmio.c
index 14cee3a..8a567c9 100644
--- a/drivers/staging/comedi/drivers/pcmmio.c
+++ b/drivers/staging/comedi/drivers/pcmmio.c
@@ -252,7 +252,8 @@ static int pcmmio_dio_insn_bits(struct comedi_device *dev,
 
 #ifdef DAMMIT_ITS_BROKEN
/* DEBUG */
-   printk(KERN_DEBUG "write mask: %08x  data: %08x\n", data[0], data[1]);
+   dev_dbg(dev->class_dev, "write mask: %08x  data: %08x\n",
+   data[0], data[1]);
 #endif
 
s->state = 0;
@@ -273,10 +274,11 @@ static int pcmmio_dio_insn_bits(struct comedi_device *dev,
 
 #ifdef DAMMIT_ITS_BROKEN
/* DEBUG */
-   printk
-   (KERN_DEBUG "byte %d wmb %02x db %02x offset %02d io %04x,"
-" data_in %02x ", byte_no, (unsigned)write_mask_byte,
-(unsigned)data_byte, offset, ioaddr, (unsigned)byte);
+   dev_dbg(dev->class_dev,
+   "byte %d wmb %02x db %02x offset %02d io %04x 
data_in %02x ",
+   byte_no, (unsigned)write_mask_byte,
+   (unsigned)data_byte, offset, ioaddr,
+   (unsigned)byte);
 #endif
 
if (write_mask_byte) {
@@ -293,7 +295,7 @@ static int pcmmio_dio_insn_bits(struct comedi_device *dev,
}
 #ifdef DAMMIT_ITS_BROKEN
/* DEBUG */
-   printk(KERN_DEBUG "data_out_byte %02x\n", (unsigned)byte);
+   dev_dbg(dev->class_dev, "data_out_byte %02x\n", (unsigned)byte);
 #endif
/* save the digital input lines for this byte.. */
s->state |= ((unsigned int)byte) << offset;
@@ -304,7 +306,8 @@ static int pcmmio_dio_insn_bits(struct comedi_device *dev,
 
 #ifdef DAMMIT_ITS_BROKEN
/* DEBUG */
-   printk(KERN_DEBUG "s->state %08x data_out %08x\n", s->state, data[1]);
+   dev_dbg(dev->class_dev, "s->state %08x data_out %08x\n",
+   s->state, data[1]);
 #endif
 
return insn->n;
@@ -505,8 +508,8 @@ static irqreturn_t interrupt_pcmmio(int irq, void *d)
 * TODO here: dispatch io lines to subdevs
 * with commands..
 */
-   printk
-   (KERN_DEBUG "got edge detect interrupt %d 
asic %d which_chans: %06x\n",
+   dev_dbg(dev->class_dev,
+"got edge detect interrupt %d asic %d 
which_chans: %06x\n",
 irq, asic, triggered);
for (i = 2; i < dev->n_subdevices; i++) {
s = >subdevices[i];
@@ -1021,7 +1024,7 @@ static int pcmmio_attach(struct comedi_device *dev, 
struct comedi_devconfig *it)
kcalloc(n_subdevs, sizeof(struct pcmmio_subdev_private),
GFP_KERNEL);
if (!devpriv->sprivs) {
-   printk(KERN_ERR "comedi%d: cannot allocate subdevice private 
data structures\n",
+   dev_err(dev->class_dev, "comedi%d: cannot allocate subdevice 
private data structures\n",
dev->minor);
return -ENOMEM;
}
-- 
1.8.4.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] Staging: comedi: replace printk() calls with dev_dbg() in pcmmio.c

2013-12-28 Thread Chase Southwood
From: Chase Southwood chase.southw...@yahoo.com

This is a patch for pcmmio.c that changes several printk() calls to dev_dbg() 
or dev_err() to fix checkpatch.pl warnings.  Patched from 3.13-rc5.

Signed-off-by: Chase Southwood chase.southw...@yahoo.com
---
 drivers/staging/comedi/drivers/pcmmio.c | 23 +--
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/comedi/drivers/pcmmio.c 
b/drivers/staging/comedi/drivers/pcmmio.c
index 14cee3a..8a567c9 100644
--- a/drivers/staging/comedi/drivers/pcmmio.c
+++ b/drivers/staging/comedi/drivers/pcmmio.c
@@ -252,7 +252,8 @@ static int pcmmio_dio_insn_bits(struct comedi_device *dev,
 
 #ifdef DAMMIT_ITS_BROKEN
/* DEBUG */
-   printk(KERN_DEBUG write mask: %08x  data: %08x\n, data[0], data[1]);
+   dev_dbg(dev-class_dev, write mask: %08x  data: %08x\n,
+   data[0], data[1]);
 #endif
 
s-state = 0;
@@ -273,10 +274,11 @@ static int pcmmio_dio_insn_bits(struct comedi_device *dev,
 
 #ifdef DAMMIT_ITS_BROKEN
/* DEBUG */
-   printk
-   (KERN_DEBUG byte %d wmb %02x db %02x offset %02d io %04x,
- data_in %02x , byte_no, (unsigned)write_mask_byte,
-(unsigned)data_byte, offset, ioaddr, (unsigned)byte);
+   dev_dbg(dev-class_dev,
+   byte %d wmb %02x db %02x offset %02d io %04x 
data_in %02x ,
+   byte_no, (unsigned)write_mask_byte,
+   (unsigned)data_byte, offset, ioaddr,
+   (unsigned)byte);
 #endif
 
if (write_mask_byte) {
@@ -293,7 +295,7 @@ static int pcmmio_dio_insn_bits(struct comedi_device *dev,
}
 #ifdef DAMMIT_ITS_BROKEN
/* DEBUG */
-   printk(KERN_DEBUG data_out_byte %02x\n, (unsigned)byte);
+   dev_dbg(dev-class_dev, data_out_byte %02x\n, (unsigned)byte);
 #endif
/* save the digital input lines for this byte.. */
s-state |= ((unsigned int)byte)  offset;
@@ -304,7 +306,8 @@ static int pcmmio_dio_insn_bits(struct comedi_device *dev,
 
 #ifdef DAMMIT_ITS_BROKEN
/* DEBUG */
-   printk(KERN_DEBUG s-state %08x data_out %08x\n, s-state, data[1]);
+   dev_dbg(dev-class_dev, s-state %08x data_out %08x\n,
+   s-state, data[1]);
 #endif
 
return insn-n;
@@ -505,8 +508,8 @@ static irqreturn_t interrupt_pcmmio(int irq, void *d)
 * TODO here: dispatch io lines to subdevs
 * with commands..
 */
-   printk
-   (KERN_DEBUG got edge detect interrupt %d 
asic %d which_chans: %06x\n,
+   dev_dbg(dev-class_dev,
+got edge detect interrupt %d asic %d 
which_chans: %06x\n,
 irq, asic, triggered);
for (i = 2; i  dev-n_subdevices; i++) {
s = dev-subdevices[i];
@@ -1021,7 +1024,7 @@ static int pcmmio_attach(struct comedi_device *dev, 
struct comedi_devconfig *it)
kcalloc(n_subdevs, sizeof(struct pcmmio_subdev_private),
GFP_KERNEL);
if (!devpriv-sprivs) {
-   printk(KERN_ERR comedi%d: cannot allocate subdevice private 
data structures\n,
+   dev_err(dev-class_dev, comedi%d: cannot allocate subdevice 
private data structures\n,
dev-minor);
return -ENOMEM;
}
-- 
1.8.4.2

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


<    1   2   3   4   5