aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/triflex.c
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
commit8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch)
treea8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /drivers/ide/triflex.c
parent406089d01562f1e2bf9f089fd7637009ebaad589 (diff)
Patched in Tegra support.
Diffstat (limited to 'drivers/ide/triflex.c')
-rw-r--r--drivers/ide/triflex.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/drivers/ide/triflex.c b/drivers/ide/triflex.c
index 7f1af9493f0..e53a1b78378 100644
--- a/drivers/ide/triflex.c
+++ b/drivers/ide/triflex.c
@@ -92,7 +92,7 @@ static const struct ide_port_ops triflex_port_ops = {
92 .set_dma_mode = triflex_set_mode, 92 .set_dma_mode = triflex_set_mode,
93}; 93};
94 94
95static const struct ide_port_info triflex_device = { 95static const struct ide_port_info triflex_device __devinitdata = {
96 .name = DRV_NAME, 96 .name = DRV_NAME,
97 .enablebits = {{0x80, 0x01, 0x01}, {0x80, 0x02, 0x02}}, 97 .enablebits = {{0x80, 0x01, 0x01}, {0x80, 0x02, 0x02}},
98 .port_ops = &triflex_port_ops, 98 .port_ops = &triflex_port_ops,
@@ -101,7 +101,8 @@ static const struct ide_port_info triflex_device = {
101 .mwdma_mask = ATA_MWDMA2, 101 .mwdma_mask = ATA_MWDMA2,
102}; 102};
103 103
104static int triflex_init_one(struct pci_dev *dev, const struct pci_device_id *id) 104static int __devinit triflex_init_one(struct pci_dev *dev,
105 const struct pci_device_id *id)
105{ 106{
106 return ide_pci_init_one(dev, &triflex_device, NULL); 107 return ide_pci_init_one(dev, &triflex_device, NULL);
107} 108}
@@ -112,26 +113,12 @@ static const struct pci_device_id triflex_pci_tbl[] = {
112}; 113};
113MODULE_DEVICE_TABLE(pci, triflex_pci_tbl); 114MODULE_DEVICE_TABLE(pci, triflex_pci_tbl);
114 115
115#ifdef CONFIG_PM
116static int triflex_ide_pci_suspend(struct pci_dev *dev, pm_message_t state)
117{
118 /*
119 * We must not disable or powerdown the device.
120 * APM bios refuses to suspend if IDE is not accessible.
121 */
122 pci_save_state(dev);
123 return 0;
124}
125#else
126#define triflex_ide_pci_suspend NULL
127#endif
128
129static struct pci_driver triflex_pci_driver = { 116static struct pci_driver triflex_pci_driver = {
130 .name = "TRIFLEX_IDE", 117 .name = "TRIFLEX_IDE",
131 .id_table = triflex_pci_tbl, 118 .id_table = triflex_pci_tbl,
132 .probe = triflex_init_one, 119 .probe = triflex_init_one,
133 .remove = ide_pci_remove, 120 .remove = ide_pci_remove,
134 .suspend = triflex_ide_pci_suspend, 121 .suspend = ide_pci_suspend,
135 .resume = ide_pci_resume, 122 .resume = ide_pci_resume,
136}; 123};
137 124