diff options
author | Mark <reodge@gmail.com> | 2010-05-17 07:34:27 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-18 17:49:23 -0400 |
commit | 026386976067996a6fc084b1926558522126cfdd (patch) | |
tree | 7e3306dd4803b0f8c0da1751543f82be9c4a30a8 | |
parent | 5763dcab5cd7de27d6db50efd393c416177c56c7 (diff) |
Staging: comedi: Altered the way printk is used in 8255.c
This patch moves around the use of printk calls in 8255.c to include accurate
logging levels and in turn fixes a few warnings from checkpatch.
Signed-off-by: Mark Rankilor <reodge@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/comedi/drivers/8255.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/staging/comedi/drivers/8255.c b/drivers/staging/comedi/drivers/8255.c index b2e80dd5c266..fe63830bd850 100644 --- a/drivers/staging/comedi/drivers/8255.c +++ b/drivers/staging/comedi/drivers/8255.c | |||
@@ -396,8 +396,6 @@ static int dev_8255_attach(struct comedi_device *dev, | |||
396 | unsigned long iobase; | 396 | unsigned long iobase; |
397 | int i; | 397 | int i; |
398 | 398 | ||
399 | printk("comedi%d: 8255:", dev->minor); | ||
400 | |||
401 | dev->board_name = "8255"; | 399 | dev->board_name = "8255"; |
402 | 400 | ||
403 | for (i = 0; i < COMEDI_NDEVCONFOPTS; i++) { | 401 | for (i = 0; i < COMEDI_NDEVCONFOPTS; i++) { |
@@ -406,13 +404,20 @@ static int dev_8255_attach(struct comedi_device *dev, | |||
406 | break; | 404 | break; |
407 | } | 405 | } |
408 | if (i == 0) { | 406 | if (i == 0) { |
409 | printk(" no devices specified\n"); | 407 | printk(KERN_WARNING |
408 | "comedi%d: 8255: no devices specified\n", dev->minor); | ||
410 | return -EINVAL; | 409 | return -EINVAL; |
411 | } | 410 | } |
412 | 411 | ||
413 | ret = alloc_subdevices(dev, i); | 412 | ret = alloc_subdevices(dev, i); |
414 | if (ret < 0) | 413 | if (ret < 0) { |
414 | /* FIXME this printk call should give a proper message, the | ||
415 | * below line just maintains previous functionality */ | ||
416 | printk("comedi%d: 8255:", dev->minor); | ||
415 | return ret; | 417 | return ret; |
418 | } | ||
419 | |||
420 | printk(KERN_INFO "comedi%d: 8255:", dev->minor); | ||
416 | 421 | ||
417 | for (i = 0; i < dev->n_subdevices; i++) { | 422 | for (i = 0; i < dev->n_subdevices; i++) { |
418 | iobase = it->options[i]; | 423 | iobase = it->options[i]; |
@@ -439,7 +444,7 @@ static int dev_8255_detach(struct comedi_device *dev) | |||
439 | unsigned long iobase; | 444 | unsigned long iobase; |
440 | struct comedi_subdevice *s; | 445 | struct comedi_subdevice *s; |
441 | 446 | ||
442 | printk("comedi%d: 8255: remove\n", dev->minor); | 447 | printk(KERN_INFO "comedi%d: 8255: remove\n", dev->minor); |
443 | 448 | ||
444 | for (i = 0; i < dev->n_subdevices; i++) { | 449 | for (i = 0; i < dev->n_subdevices; i++) { |
445 | s = dev->subdevices + i; | 450 | s = dev->subdevices + i; |