aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@openedhand.com>2008-06-20 05:11:19 -0400
committerSamuel Ortiz <samuel@sortiz.org>2008-07-20 13:55:08 -0400
commit24f4f2eef2714bddd6fdb823be53fc2ee69699e0 (patch)
tree4c7cb716098ba600e6a97e23ec876200d24dbb78 /drivers
parent3b26bf17226f66bfd6cd4e36ac81f83fe994043a (diff)
mfd: use dev_* macros for asic3 debugging
We replace the various printks, and use the dev_* macros instead. Signed-off-by: Samuel Ortiz <sameo@openedhand.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mfd/asic3.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/drivers/mfd/asic3.c b/drivers/mfd/asic3.c
index 36b46ded1bff..1924eb01cc8c 100644
--- a/drivers/mfd/asic3.c
+++ b/drivers/mfd/asic3.c
@@ -145,8 +145,7 @@ static void asic3_irq_demux(unsigned int irq, struct irq_desc *desc)
145 } 145 }
146 146
147 if (iter >= MAX_ASIC_ISR_LOOPS) 147 if (iter >= MAX_ASIC_ISR_LOOPS)
148 printk(KERN_ERR "%s: interrupt processing overrun\n", 148 dev_err(asic->dev, "interrupt processing overrun\n");
149 __func__);
150} 149}
151 150
152static inline int asic3_irq_to_bank(struct asic3 *asic, int irq) 151static inline int asic3_irq_to_bank(struct asic3 *asic, int irq)
@@ -282,7 +281,7 @@ static int asic3_gpio_irq_type(unsigned int irq, unsigned int type)
282 * be careful to not unmask them if mask was also called. 281 * be careful to not unmask them if mask was also called.
283 * Probably need internal state for mask. 282 * Probably need internal state for mask.
284 */ 283 */
285 printk(KERN_NOTICE "asic3: irq type not changed.\n"); 284 dev_notice(asic->dev, "irq type not changed\n");
286 } 285 }
287 asic3_write_register(asic, bank + ASIC3_GPIO_LevelTrigger, 286 asic3_write_register(asic, bank + ASIC3_GPIO_LevelTrigger,
288 level); 287 level);
@@ -376,8 +375,8 @@ static int asic3_gpio_direction(struct gpio_chip *chip,
376 gpio_base = ASIC3_GPIO_TO_BASE(offset); 375 gpio_base = ASIC3_GPIO_TO_BASE(offset);
377 376
378 if (gpio_base > ASIC3_GPIO_D_Base) { 377 if (gpio_base > ASIC3_GPIO_D_Base) {
379 printk(KERN_ERR "Invalid base (0x%x) for gpio %d\n", 378 dev_err(asic->dev, "Invalid base (0x%x) for gpio %d\n",
380 gpio_base, offset); 379 gpio_base, offset);
381 return -EINVAL; 380 return -EINVAL;
382 } 381 }
383 382
@@ -422,8 +421,8 @@ static int asic3_gpio_get(struct gpio_chip *chip,
422 gpio_base = ASIC3_GPIO_TO_BASE(offset); 421 gpio_base = ASIC3_GPIO_TO_BASE(offset);
423 422
424 if (gpio_base > ASIC3_GPIO_D_Base) { 423 if (gpio_base > ASIC3_GPIO_D_Base) {
425 printk(KERN_ERR "Invalid base (0x%x) for gpio %d\n", 424 dev_err(asic->dev, "Invalid base (0x%x) for gpio %d\n",
426 gpio_base, offset); 425 gpio_base, offset);
427 return -EINVAL; 426 return -EINVAL;
428 } 427 }
429 428
@@ -442,8 +441,8 @@ static void asic3_gpio_set(struct gpio_chip *chip,
442 gpio_base = ASIC3_GPIO_TO_BASE(offset); 441 gpio_base = ASIC3_GPIO_TO_BASE(offset);
443 442
444 if (gpio_base > ASIC3_GPIO_D_Base) { 443 if (gpio_base > ASIC3_GPIO_D_Base) {
445 printk(KERN_ERR "Invalid base (0x%x) for gpio %d\n", 444 dev_err(asic->dev, "Invalid base (0x%x) for gpio %d\n",
446 gpio_base, offset); 445 gpio_base, offset);
447 return; 446 return;
448 } 447 }
449 448
@@ -548,7 +547,7 @@ static int asic3_probe(struct platform_device *pdev)
548 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); 547 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
549 if (!mem) { 548 if (!mem) {
550 ret = -ENOMEM; 549 ret = -ENOMEM;
551 printk(KERN_ERR "asic3: no MEM resource\n"); 550 dev_err(asic->dev, "no MEM resource\n");
552 goto out_free; 551 goto out_free;
553 } 552 }
554 553
@@ -556,7 +555,7 @@ static int asic3_probe(struct platform_device *pdev)
556 asic->mapping = ioremap(mem->start, PAGE_SIZE); 555 asic->mapping = ioremap(mem->start, PAGE_SIZE);
557 if (!asic->mapping) { 556 if (!asic->mapping) {
558 ret = -ENOMEM; 557 ret = -ENOMEM;
559 printk(KERN_ERR "asic3: couldn't ioremap\n"); 558 dev_err(asic->dev, "Couldn't ioremap\n");
560 goto out_free; 559 goto out_free;
561 } 560 }
562 561
@@ -572,7 +571,7 @@ static int asic3_probe(struct platform_device *pdev)
572 571
573 ret = asic3_irq_probe(pdev); 572 ret = asic3_irq_probe(pdev);
574 if (ret < 0) { 573 if (ret < 0) {
575 printk(KERN_ERR "asic3: couldn't probe IRQs\n"); 574 dev_err(asic->dev, "Couldn't probe IRQs\n");
576 goto out_unmap; 575 goto out_unmap;
577 } 576 }
578 577
@@ -587,11 +586,11 @@ static int asic3_probe(struct platform_device *pdev)
587 pdata->gpio_config, 586 pdata->gpio_config,
588 pdata->gpio_config_num); 587 pdata->gpio_config_num);
589 if (ret < 0) { 588 if (ret < 0) {
590 printk(KERN_ERR "GPIO probe failed\n"); 589 dev_err(asic->dev, "GPIO probe failed\n");
591 goto out_irq; 590 goto out_irq;
592 } 591 }
593 592
594 printk(KERN_INFO "ASIC3 Core driver\n"); 593 dev_info(asic->dev, "ASIC3 Core driver\n");
595 594
596 return 0; 595 return 0;
597 596