aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/it821x.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-24 16:53:32 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-24 16:53:32 -0400
commitced3ec8aa7d0fa3300187ee47c144a22ccfc974e (patch)
treeea48651fe1b372685020cd67ac133240829c1576 /drivers/ide/pci/it821x.c
parent04ba6e739e9c0623c25f94b191fd20dfbd1b26e3 (diff)
ide: prefix messages from IDE PCI host drivers by driver name
Prefix messages from IDE PCI host drivers by driver name instead of marketed chipset name (it is still possible to exactly identify the particular chipset basing on driver messages). As a bonus this provides nice code savings for some drivers: text data bss dec hex filename 3826 112 8 3946 f6a drivers/ide/pci/amd74xx.o.before 2786 112 8 2906 b5a drivers/ide/pci/amd74xx.o.after 764 108 0 872 368 drivers/ide/pci/cs5520.o.before 680 108 0 788 314 drivers/ide/pci/cs5520.o.after 1680 112 4 1796 704 drivers/ide/pci/generic.o.before 1155 112 4 1271 4f7 drivers/ide/pci/generic.o.after 7128 792 0 7920 1ef0 drivers/ide/pci/hpt366.o.before 6984 792 0 7776 1e60 drivers/ide/pci/hpt366.o.after 2800 148 0 2948 b84 drivers/ide/pci/pdc202xx_new.o.before 2523 148 0 2671 a6f drivers/ide/pci/pdc202xx_new.o.after 2831 148 0 2979 ba3 drivers/ide/pci/pdc202xx_old.o.before 2683 148 0 2831 b0f drivers/ide/pci/pdc202xx_old.o.after 3776 112 4 3892 f34 drivers/ide/pci/piix.o.before 2804 112 4 2920 b68 drivers/ide/pci/piix.o.after 4693 116 0 4809 12c9 drivers/ide/pci/siimage.o.before 4600 116 0 4716 126c drivers/ide/pci/siimage.o.after Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/it821x.c')
-rw-r--r--drivers/ide/pci/it821x.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/ide/pci/it821x.c b/drivers/ide/pci/it821x.c
index a3d8959436c5..74173352741f 100644
--- a/drivers/ide/pci/it821x.c
+++ b/drivers/ide/pci/it821x.c
@@ -67,6 +67,8 @@
67#include <linux/ide.h> 67#include <linux/ide.h>
68#include <linux/init.h> 68#include <linux/init.h>
69 69
70#define DRV_NAME "it821x"
71
70struct it821x_dev 72struct it821x_dev
71{ 73{
72 unsigned int smart:1, /* Are we in smart raid mode */ 74 unsigned int smart:1, /* Are we in smart raid mode */
@@ -569,7 +571,7 @@ static void __devinit init_hwif_it821x(ide_hwif_t *hwif)
569 idev->timing10 = 1; 571 idev->timing10 = 1;
570 hwif->host_flags |= IDE_HFLAG_NO_ATAPI_DMA; 572 hwif->host_flags |= IDE_HFLAG_NO_ATAPI_DMA;
571 if (idev->smart == 0) 573 if (idev->smart == 0)
572 printk(KERN_WARNING "it821x %s: revision 0x10, " 574 printk(KERN_WARNING DRV_NAME " %s: revision 0x10, "
573 "workarounds activated\n", pci_name(dev)); 575 "workarounds activated\n", pci_name(dev));
574 } 576 }
575 577
@@ -610,12 +612,12 @@ static unsigned int __devinit init_chipset_it821x(struct pci_dev *dev, const cha
610 612
611 /* Force the card into bypass mode if so requested */ 613 /* Force the card into bypass mode if so requested */
612 if (it8212_noraid) { 614 if (it8212_noraid) {
613 printk(KERN_INFO "it821x %s: forcing bypass mode\n", 615 printk(KERN_INFO DRV_NAME " %s: forcing bypass mode\n",
614 pci_name(dev)); 616 pci_name(dev));
615 it8212_disable_raid(dev); 617 it8212_disable_raid(dev);
616 } 618 }
617 pci_read_config_byte(dev, 0x50, &conf); 619 pci_read_config_byte(dev, 0x50, &conf);
618 printk(KERN_INFO "it821x %s: controller in %s mode\n", 620 printk(KERN_INFO DRV_NAME " %s: controller in %s mode\n",
619 pci_name(dev), mode[conf & 1]); 621 pci_name(dev), mode[conf & 1]);
620 return 0; 622 return 0;
621} 623}
@@ -629,7 +631,7 @@ static const struct ide_port_ops it821x_port_ops = {
629}; 631};
630 632
631static const struct ide_port_info it821x_chipset __devinitdata = { 633static const struct ide_port_info it821x_chipset __devinitdata = {
632 .name = "IT821X", 634 .name = DRV_NAME,
633 .init_chipset = init_chipset_it821x, 635 .init_chipset = init_chipset_it821x,
634 .init_hwif = init_hwif_it821x, 636 .init_hwif = init_hwif_it821x,
635 .port_ops = &it821x_port_ops, 637 .port_ops = &it821x_port_ops,
@@ -652,7 +654,7 @@ static int __devinit it821x_init_one(struct pci_dev *dev, const struct pci_devic
652 654
653 itdevs = kzalloc(2 * sizeof(*itdevs), GFP_KERNEL); 655 itdevs = kzalloc(2 * sizeof(*itdevs), GFP_KERNEL);
654 if (itdevs == NULL) { 656 if (itdevs == NULL) {
655 printk(KERN_ERR "it821x %s: out of memory\n", pci_name(dev)); 657 printk(KERN_ERR DRV_NAME " %s: out of memory\n", pci_name(dev));
656 return -ENOMEM; 658 return -ENOMEM;
657 } 659 }
658 660