aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp/pnpbios
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2008-04-28 18:34:12 -0400
committerLen Brown <len.brown@intel.com>2008-04-29 03:22:23 -0400
commitaf11cb2d521f9d7e10c565bafe8f2358772baa65 (patch)
tree3a3a5bfa30e5f25a94dcb83dbfa31691918d6c81 /drivers/pnp/pnpbios
parent2cd1393098073426256cb4543c897f8c340d0b93 (diff)
PNP: use dev_printk when possible
Use dev_printk() when possible for more informative error messages. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Acked-By: Rene Herman <rene.herman@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/pnp/pnpbios')
-rw-r--r--drivers/pnp/pnpbios/rsparser.c36
1 files changed, 14 insertions, 22 deletions
diff --git a/drivers/pnp/pnpbios/rsparser.c b/drivers/pnp/pnpbios/rsparser.c
index e90a3d4360b2..4390e3b41df0 100644
--- a/drivers/pnp/pnpbios/rsparser.c
+++ b/drivers/pnp/pnpbios/rsparser.c
@@ -241,9 +241,8 @@ static unsigned char *pnpbios_parse_allocated_resource_data(struct pnp_dev *dev,
241 241
242 default: /* an unkown tag */ 242 default: /* an unkown tag */
243len_err: 243len_err:
244 printk(KERN_ERR 244 dev_err(&dev->dev, "unknown tag %#x length %d\n",
245 "PnPBIOS: Unknown tag '0x%x', length '%d'.\n", 245 tag, len);
246 tag, len);
247 break; 246 break;
248 } 247 }
249 248
@@ -254,8 +253,7 @@ len_err:
254 p += len + 1; 253 p += len + 1;
255 } 254 }
256 255
257 printk(KERN_ERR 256 dev_err(&dev->dev, "no end tag in resource structure\n");
258 "PnPBIOS: Resource structure does not contain an end tag.\n");
259 257
260 return NULL; 258 return NULL;
261} 259}
@@ -471,8 +469,8 @@ pnpbios_parse_resource_option_data(unsigned char *p, unsigned char *end,
471 if (len != 0) 469 if (len != 0)
472 goto len_err; 470 goto len_err;
473 if (option_independent == option) 471 if (option_independent == option)
474 printk(KERN_WARNING 472 dev_warn(&dev->dev, "missing "
475 "PnPBIOS: Missing SMALL_TAG_STARTDEP tag\n"); 473 "SMALL_TAG_STARTDEP tag\n");
476 option = option_independent; 474 option = option_independent;
477 dev_dbg(&dev->dev, "end dependent options\n"); 475 dev_dbg(&dev->dev, "end dependent options\n");
478 break; 476 break;
@@ -482,9 +480,8 @@ pnpbios_parse_resource_option_data(unsigned char *p, unsigned char *end,
482 480
483 default: /* an unkown tag */ 481 default: /* an unkown tag */
484len_err: 482len_err:
485 printk(KERN_ERR 483 dev_err(&dev->dev, "unknown tag %#x length %d\n",
486 "PnPBIOS: Unknown tag '0x%x', length '%d'.\n", 484 tag, len);
487 tag, len);
488 break; 485 break;
489 } 486 }
490 487
@@ -495,8 +492,7 @@ len_err:
495 p += len + 1; 492 p += len + 1;
496 } 493 }
497 494
498 printk(KERN_ERR 495 dev_err(&dev->dev, "no end tag in resource structure\n");
499 "PnPBIOS: Resource structure does not contain an end tag.\n");
500 496
501 return NULL; 497 return NULL;
502} 498}
@@ -554,9 +550,8 @@ static unsigned char *pnpbios_parse_compatible_ids(unsigned char *p,
554 550
555 default: /* an unkown tag */ 551 default: /* an unkown tag */
556len_err: 552len_err:
557 printk(KERN_ERR 553 dev_err(&dev->dev, "unknown tag %#x length %d\n",
558 "PnPBIOS: Unknown tag '0x%x', length '%d'.\n", 554 tag, len);
559 tag, len);
560 break; 555 break;
561 } 556 }
562 557
@@ -567,8 +562,7 @@ len_err:
567 p += len + 1; 562 p += len + 1;
568 } 563 }
569 564
570 printk(KERN_ERR 565 dev_err(&dev->dev, "no end tag in resource structure\n");
571 "PnPBIOS: Resource structure does not contain an end tag.\n");
572 566
573 return NULL; 567 return NULL;
574} 568}
@@ -774,9 +768,8 @@ static unsigned char *pnpbios_encode_allocated_resource_data(struct pnp_dev
774 768
775 default: /* an unkown tag */ 769 default: /* an unkown tag */
776len_err: 770len_err:
777 printk(KERN_ERR 771 dev_err(&dev->dev, "unknown tag %#x length %d\n",
778 "PnPBIOS: Unknown tag '0x%x', length '%d'.\n", 772 tag, len);
779 tag, len);
780 break; 773 break;
781 } 774 }
782 775
@@ -787,8 +780,7 @@ len_err:
787 p += len + 1; 780 p += len + 1;
788 } 781 }
789 782
790 printk(KERN_ERR 783 dev_err(&dev->dev, "no end tag in resource structure\n");
791 "PnPBIOS: Resource structure does not contain an end tag.\n");
792 784
793 return NULL; 785 return NULL;
794} 786}