aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/siimage.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/siimage.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/siimage.c')
-rw-r--r--drivers/ide/pci/siimage.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c
index fc29f1ca503a..572b479a3922 100644
--- a/drivers/ide/pci/siimage.c
+++ b/drivers/ide/pci/siimage.c
@@ -44,6 +44,8 @@
44#include <linux/init.h> 44#include <linux/init.h>
45#include <linux/io.h> 45#include <linux/io.h>
46 46
47#define DRV_NAME "siimage"
48
47/** 49/**
48 * pdev_is_sata - check if device is SATA 50 * pdev_is_sata - check if device is SATA
49 * @pdev: PCI device to check 51 * @pdev: PCI device to check
@@ -717,9 +719,9 @@ static const struct ide_dma_ops sil_dma_ops = {
717 .dma_lost_irq = ide_dma_lost_irq, 719 .dma_lost_irq = ide_dma_lost_irq,
718}; 720};
719 721
720#define DECLARE_SII_DEV(name_str, p_ops) \ 722#define DECLARE_SII_DEV(p_ops) \
721 { \ 723 { \
722 .name = name_str, \ 724 .name = DRV_NAME, \
723 .init_chipset = init_chipset_siimage, \ 725 .init_chipset = init_chipset_siimage, \
724 .init_iops = init_iops_siimage, \ 726 .init_iops = init_iops_siimage, \
725 .port_ops = p_ops, \ 727 .port_ops = p_ops, \
@@ -730,9 +732,8 @@ static const struct ide_dma_ops sil_dma_ops = {
730 } 732 }
731 733
732static const struct ide_port_info siimage_chipsets[] __devinitdata = { 734static const struct ide_port_info siimage_chipsets[] __devinitdata = {
733 /* 0 */ DECLARE_SII_DEV("SiI680", &sil_pata_port_ops), 735 /* 0: SiI680 */ DECLARE_SII_DEV(&sil_pata_port_ops),
734 /* 1 */ DECLARE_SII_DEV("SiI3112 Serial ATA", &sil_sata_port_ops), 736 /* 1: SiI3112 */ DECLARE_SII_DEV(&sil_sata_port_ops)
735 /* 2 */ DECLARE_SII_DEV("Adaptec AAR-1210SA", &sil_sata_port_ops)
736}; 737};
737 738
738/** 739/**
@@ -761,7 +762,7 @@ static int __devinit siimage_init_one(struct pci_dev *dev,
761 static int first = 1; 762 static int first = 1;
762 763
763 if (first) { 764 if (first) {
764 printk(KERN_INFO "siimage: For full SATA support you " 765 printk(KERN_INFO DRV_NAME ": For full SATA support you "
765 "should use the libata sata_sil module.\n"); 766 "should use the libata sata_sil module.\n");
766 first = 0; 767 first = 0;
767 } 768 }
@@ -780,7 +781,7 @@ static int __devinit siimage_init_one(struct pci_dev *dev,
780 * seem to get terminally confused in the PCI spaces. 781 * seem to get terminally confused in the PCI spaces.
781 */ 782 */
782 if (!request_mem_region(bar5, barsize, d.name)) { 783 if (!request_mem_region(bar5, barsize, d.name)) {
783 printk(KERN_WARNING "siimage %s: MMIO ports not " 784 printk(KERN_WARNING DRV_NAME " %s: MMIO ports not "
784 "available\n", pci_name(dev)); 785 "available\n", pci_name(dev));
785 } else { 786 } else {
786 ioaddr = ioremap(bar5, barsize); 787 ioaddr = ioremap(bar5, barsize);
@@ -823,7 +824,7 @@ static const struct pci_device_id siimage_pci_tbl[] = {
823 { PCI_VDEVICE(CMD, PCI_DEVICE_ID_SII_680), 0 }, 824 { PCI_VDEVICE(CMD, PCI_DEVICE_ID_SII_680), 0 },
824#ifdef CONFIG_BLK_DEV_IDE_SATA 825#ifdef CONFIG_BLK_DEV_IDE_SATA
825 { PCI_VDEVICE(CMD, PCI_DEVICE_ID_SII_3112), 1 }, 826 { PCI_VDEVICE(CMD, PCI_DEVICE_ID_SII_3112), 1 },
826 { PCI_VDEVICE(CMD, PCI_DEVICE_ID_SII_1210SA), 2 }, 827 { PCI_VDEVICE(CMD, PCI_DEVICE_ID_SII_1210SA), 1 },
827#endif 828#endif
828 { 0, }, 829 { 0, },
829}; 830};