X-Git-Url: http://git.onelab.eu/?p=linux-2.6.git;a=blobdiff_plain;f=drivers%2Fide%2Fpci%2Ftriflex.c;h=52e088e2569f369354288847a5ed83af4bd343dd;hp=f7ff2f4d101d968f8f295322b1021df488b32603;hb=9213980e6a70d8473e0ffd4b39ab5b6caaba9ff5;hpb=c449269f45c2cdf53af08c8d0af37472f66539d9 diff --git a/drivers/ide/pci/triflex.c b/drivers/ide/pci/triflex.c index f7ff2f4d1..52e088e25 100644 --- a/drivers/ide/pci/triflex.c +++ b/drivers/ide/pci/triflex.c @@ -41,8 +41,6 @@ #include #include -#include "triflex.h" - static struct pci_dev *triflex_dev; #ifdef CONFIG_PROC_FS @@ -217,19 +215,32 @@ static unsigned int __init init_chipset_triflex(struct pci_dev *dev, return 0; } +static ide_pci_device_t triflex_device __devinitdata = { + .name = "TRIFLEX", + .init_chipset = init_chipset_triflex, + .init_hwif = init_hwif_triflex, + .channels = 2, + .autodma = AUTODMA, + .enablebits = {{0x80, 0x01, 0x01}, {0x80, 0x02, 0x02}}, + .bootable = ON_BOARD, +}; + static int __devinit triflex_init_one(struct pci_dev *dev, const struct pci_device_id *id) { - ide_pci_device_t *d = &triflex_devices[id->driver_data]; - if (dev->device != d->device) - BUG(); - - ide_setup_pci_device(dev, d); + ide_setup_pci_device(dev, &triflex_device); triflex_dev = dev; - + return 0; } +static struct pci_device_id triflex_pci_tbl[] = { + { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_TRIFLEX_IDE, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, + { 0, }, +}; +MODULE_DEVICE_TABLE(pci, triflex_pci_tbl); + static struct pci_driver driver = { .name = "TRIFLEX IDE", .id_table = triflex_pci_tbl,