diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-24 16:53:32 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-24 16:53:32 -0400 |
commit | ced3ec8aa7d0fa3300187ee47c144a22ccfc974e (patch) | |
tree | ea48651fe1b372685020cd67ac133240829c1576 /drivers/ide/pci/pdc202xx_old.c | |
parent | 04ba6e739e9c0623c25f94b191fd20dfbd1b26e3 (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/pdc202xx_old.c')
-rw-r--r-- | drivers/ide/pci/pdc202xx_old.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c index 5cb2731047e9..da92d127868f 100644 --- a/drivers/ide/pci/pdc202xx_old.c +++ b/drivers/ide/pci/pdc202xx_old.c | |||
@@ -20,6 +20,8 @@ | |||
20 | 20 | ||
21 | #include <asm/io.h> | 21 | #include <asm/io.h> |
22 | 22 | ||
23 | #define DRV_NAME "pdc202xx_old" | ||
24 | |||
23 | #define PDC202XX_DEBUG_DRIVE_INFO 0 | 25 | #define PDC202XX_DEBUG_DRIVE_INFO 0 |
24 | 26 | ||
25 | static const char *pdc_quirk_drives[] = { | 27 | static const char *pdc_quirk_drives[] = { |
@@ -350,9 +352,9 @@ static const struct ide_dma_ops pdc2026x_dma_ops = { | |||
350 | .dma_timeout = pdc202xx_dma_timeout, | 352 | .dma_timeout = pdc202xx_dma_timeout, |
351 | }; | 353 | }; |
352 | 354 | ||
353 | #define DECLARE_PDC2026X_DEV(name_str, udma, extra_flags) \ | 355 | #define DECLARE_PDC2026X_DEV(udma, extra_flags) \ |
354 | { \ | 356 | { \ |
355 | .name = name_str, \ | 357 | .name = DRV_NAME, \ |
356 | .init_chipset = init_chipset_pdc202xx, \ | 358 | .init_chipset = init_chipset_pdc202xx, \ |
357 | .port_ops = &pdc2026x_port_ops, \ | 359 | .port_ops = &pdc2026x_port_ops, \ |
358 | .dma_ops = &pdc2026x_dma_ops, \ | 360 | .dma_ops = &pdc2026x_dma_ops, \ |
@@ -363,8 +365,8 @@ static const struct ide_dma_ops pdc2026x_dma_ops = { | |||
363 | } | 365 | } |
364 | 366 | ||
365 | static const struct ide_port_info pdc202xx_chipsets[] __devinitdata = { | 367 | static const struct ide_port_info pdc202xx_chipsets[] __devinitdata = { |
366 | { /* 0 */ | 368 | { /* 0: PDC20246 */ |
367 | .name = "PDC20246", | 369 | .name = DRV_NAME, |
368 | .init_chipset = init_chipset_pdc202xx, | 370 | .init_chipset = init_chipset_pdc202xx, |
369 | .port_ops = &pdc20246_port_ops, | 371 | .port_ops = &pdc20246_port_ops, |
370 | .dma_ops = &pdc20246_dma_ops, | 372 | .dma_ops = &pdc20246_dma_ops, |
@@ -374,10 +376,10 @@ static const struct ide_port_info pdc202xx_chipsets[] __devinitdata = { | |||
374 | .udma_mask = ATA_UDMA2, | 376 | .udma_mask = ATA_UDMA2, |
375 | }, | 377 | }, |
376 | 378 | ||
377 | /* 1 */ DECLARE_PDC2026X_DEV("PDC20262", ATA_UDMA4, 0), | 379 | /* 1: PDC2026{2,3} */ |
378 | /* 2 */ DECLARE_PDC2026X_DEV("PDC20263", ATA_UDMA4, 0), | 380 | DECLARE_PDC2026X_DEV(ATA_UDMA4, 0), |
379 | /* 3 */ DECLARE_PDC2026X_DEV("PDC20265", ATA_UDMA5, IDE_HFLAG_RQSIZE_256), | 381 | /* 2: PDC2026{5,7} */ |
380 | /* 4 */ DECLARE_PDC2026X_DEV("PDC20267", ATA_UDMA5, IDE_HFLAG_RQSIZE_256), | 382 | DECLARE_PDC2026X_DEV(ATA_UDMA5, IDE_HFLAG_RQSIZE_256), |
381 | }; | 383 | }; |
382 | 384 | ||
383 | /** | 385 | /** |
@@ -396,17 +398,17 @@ static int __devinit pdc202xx_init_one(struct pci_dev *dev, const struct pci_dev | |||
396 | 398 | ||
397 | d = &pdc202xx_chipsets[idx]; | 399 | d = &pdc202xx_chipsets[idx]; |
398 | 400 | ||
399 | if (idx < 3) | 401 | if (idx < 2) |
400 | pdc202ata4_fixup_irq(dev, d->name); | 402 | pdc202ata4_fixup_irq(dev, d->name); |
401 | 403 | ||
402 | if (idx == 3) { | 404 | if (dev->vendor == PCI_DEVICE_ID_PROMISE_20265) { |
403 | struct pci_dev *bridge = dev->bus->self; | 405 | struct pci_dev *bridge = dev->bus->self; |
404 | 406 | ||
405 | if (bridge && | 407 | if (bridge && |
406 | bridge->vendor == PCI_VENDOR_ID_INTEL && | 408 | bridge->vendor == PCI_VENDOR_ID_INTEL && |
407 | (bridge->device == PCI_DEVICE_ID_INTEL_I960 || | 409 | (bridge->device == PCI_DEVICE_ID_INTEL_I960 || |
408 | bridge->device == PCI_DEVICE_ID_INTEL_I960RM)) { | 410 | bridge->device == PCI_DEVICE_ID_INTEL_I960RM)) { |
409 | printk(KERN_INFO "pdc202xx_old %s: skipping Promise " | 411 | printk(KERN_INFO DRV_NAME " %s: skipping Promise " |
410 | "PDC20265 attached to I2O RAID controller\n", | 412 | "PDC20265 attached to I2O RAID controller\n", |
411 | pci_name(dev)); | 413 | pci_name(dev)); |
412 | return -ENODEV; | 414 | return -ENODEV; |
@@ -419,9 +421,9 @@ static int __devinit pdc202xx_init_one(struct pci_dev *dev, const struct pci_dev | |||
419 | static const struct pci_device_id pdc202xx_pci_tbl[] = { | 421 | static const struct pci_device_id pdc202xx_pci_tbl[] = { |
420 | { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20246), 0 }, | 422 | { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20246), 0 }, |
421 | { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20262), 1 }, | 423 | { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20262), 1 }, |
422 | { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20263), 2 }, | 424 | { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20263), 1 }, |
423 | { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20265), 3 }, | 425 | { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20265), 2 }, |
424 | { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20267), 4 }, | 426 | { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20267), 2 }, |
425 | { 0, }, | 427 | { 0, }, |
426 | }; | 428 | }; |
427 | MODULE_DEVICE_TABLE(pci, pdc202xx_pci_tbl); | 429 | MODULE_DEVICE_TABLE(pci, pdc202xx_pci_tbl); |