diff options
Diffstat (limited to 'drivers/ide')
33 files changed, 98 insertions, 100 deletions
diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index 130ef64b44f7..a34758d29516 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig | |||
@@ -54,16 +54,6 @@ menuconfig IDE | |||
54 | 54 | ||
55 | if IDE | 55 | if IDE |
56 | 56 | ||
57 | config IDE_MAX_HWIFS | ||
58 | int "Max IDE interfaces" | ||
59 | depends on ALPHA || SUPERH || IA64 || EMBEDDED | ||
60 | range 1 10 | ||
61 | default 4 | ||
62 | help | ||
63 | This is the maximum number of IDE hardware interfaces that will | ||
64 | be supported by the driver. Make sure it is at least as high as | ||
65 | the number of IDE interfaces in your system. | ||
66 | |||
67 | config BLK_DEV_IDE | 57 | config BLK_DEV_IDE |
68 | tristate "Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support" | 58 | tristate "Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support" |
69 | ---help--- | 59 | ---help--- |
diff --git a/drivers/ide/arm/ide_arm.c b/drivers/ide/arm/ide_arm.c index 176532ffae0e..f728f2927b5a 100644 --- a/drivers/ide/arm/ide_arm.c +++ b/drivers/ide/arm/ide_arm.c | |||
@@ -11,13 +11,12 @@ | |||
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/ide.h> | 12 | #include <linux/ide.h> |
13 | 13 | ||
14 | #include <asm/mach-types.h> | ||
15 | #include <asm/irq.h> | 14 | #include <asm/irq.h> |
16 | 15 | ||
17 | #define DRV_NAME "ide_arm" | 16 | #define DRV_NAME "ide_arm" |
18 | 17 | ||
19 | #ifdef CONFIG_ARCH_CLPS7500 | 18 | #ifdef CONFIG_ARCH_CLPS7500 |
20 | # include <asm/arch/hardware.h> | 19 | # include <mach/hardware.h> |
21 | # | 20 | # |
22 | # define IDE_ARM_IO (ISASLOT_IO + 0x1f0) | 21 | # define IDE_ARM_IO (ISASLOT_IO + 0x1f0) |
23 | # define IDE_ARM_IRQ IRQ_ISA_14 | 22 | # define IDE_ARM_IRQ IRQ_ISA_14 |
diff --git a/drivers/ide/arm/palm_bk3710.c b/drivers/ide/arm/palm_bk3710.c index 3e842d60eae9..f788fa5a977b 100644 --- a/drivers/ide/arm/palm_bk3710.c +++ b/drivers/ide/arm/palm_bk3710.c | |||
@@ -309,7 +309,7 @@ static void __devinit palm_bk3710_chipinit(void __iomem *base) | |||
309 | palm_bk3710_setpiomode(base, NULL, 1, 600, 0); | 309 | palm_bk3710_setpiomode(base, NULL, 1, 600, 0); |
310 | } | 310 | } |
311 | 311 | ||
312 | static u8 __devinit palm_bk3710_cable_detect(ide_hwif_t *hwif) | 312 | static u8 palm_bk3710_cable_detect(ide_hwif_t *hwif) |
313 | { | 313 | { |
314 | return ATA_CBL_PATA80; | 314 | return ATA_CBL_PATA80; |
315 | } | 315 | } |
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index e617cf08aef6..49a8c589e346 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -66,11 +66,11 @@ static struct cdrom_info *ide_cd_get(struct gendisk *disk) | |||
66 | mutex_lock(&idecd_ref_mutex); | 66 | mutex_lock(&idecd_ref_mutex); |
67 | cd = ide_cd_g(disk); | 67 | cd = ide_cd_g(disk); |
68 | if (cd) { | 68 | if (cd) { |
69 | kref_get(&cd->kref); | 69 | if (ide_device_get(cd->drive)) |
70 | if (ide_device_get(cd->drive)) { | ||
71 | kref_put(&cd->kref, ide_cd_release); | ||
72 | cd = NULL; | 70 | cd = NULL; |
73 | } | 71 | else |
72 | kref_get(&cd->kref); | ||
73 | |||
74 | } | 74 | } |
75 | mutex_unlock(&idecd_ref_mutex); | 75 | mutex_unlock(&idecd_ref_mutex); |
76 | return cd; | 76 | return cd; |
@@ -78,9 +78,11 @@ static struct cdrom_info *ide_cd_get(struct gendisk *disk) | |||
78 | 78 | ||
79 | static void ide_cd_put(struct cdrom_info *cd) | 79 | static void ide_cd_put(struct cdrom_info *cd) |
80 | { | 80 | { |
81 | ide_drive_t *drive = cd->drive; | ||
82 | |||
81 | mutex_lock(&idecd_ref_mutex); | 83 | mutex_lock(&idecd_ref_mutex); |
82 | ide_device_put(cd->drive); | ||
83 | kref_put(&cd->kref, ide_cd_release); | 84 | kref_put(&cd->kref, ide_cd_release); |
85 | ide_device_put(drive); | ||
84 | mutex_unlock(&idecd_ref_mutex); | 86 | mutex_unlock(&idecd_ref_mutex); |
85 | } | 87 | } |
86 | 88 | ||
@@ -1270,9 +1272,9 @@ static ide_startstop_t ide_cd_do_request(ide_drive_t *drive, struct request *rq, | |||
1270 | */ | 1272 | */ |
1271 | static void msf_from_bcd(struct atapi_msf *msf) | 1273 | static void msf_from_bcd(struct atapi_msf *msf) |
1272 | { | 1274 | { |
1273 | msf->minute = BCD2BIN(msf->minute); | 1275 | msf->minute = bcd2bin(msf->minute); |
1274 | msf->second = BCD2BIN(msf->second); | 1276 | msf->second = bcd2bin(msf->second); |
1275 | msf->frame = BCD2BIN(msf->frame); | 1277 | msf->frame = bcd2bin(msf->frame); |
1276 | } | 1278 | } |
1277 | 1279 | ||
1278 | int cdrom_check_status(ide_drive_t *drive, struct request_sense *sense) | 1280 | int cdrom_check_status(ide_drive_t *drive, struct request_sense *sense) |
@@ -1305,6 +1307,7 @@ static int cdrom_read_capacity(ide_drive_t *drive, unsigned long *capacity, | |||
1305 | int stat; | 1307 | int stat; |
1306 | unsigned char cmd[BLK_MAX_CDB]; | 1308 | unsigned char cmd[BLK_MAX_CDB]; |
1307 | unsigned len = sizeof(capbuf); | 1309 | unsigned len = sizeof(capbuf); |
1310 | u32 blocklen; | ||
1308 | 1311 | ||
1309 | memset(cmd, 0, BLK_MAX_CDB); | 1312 | memset(cmd, 0, BLK_MAX_CDB); |
1310 | cmd[0] = GPCMD_READ_CDVD_CAPACITY; | 1313 | cmd[0] = GPCMD_READ_CDVD_CAPACITY; |
@@ -1317,23 +1320,24 @@ static int cdrom_read_capacity(ide_drive_t *drive, unsigned long *capacity, | |||
1317 | /* | 1320 | /* |
1318 | * Sanity check the given block size | 1321 | * Sanity check the given block size |
1319 | */ | 1322 | */ |
1320 | switch (capbuf.blocklen) { | 1323 | blocklen = be32_to_cpu(capbuf.blocklen); |
1321 | case __constant_cpu_to_be32(512): | 1324 | switch (blocklen) { |
1322 | case __constant_cpu_to_be32(1024): | 1325 | case 512: |
1323 | case __constant_cpu_to_be32(2048): | 1326 | case 1024: |
1324 | case __constant_cpu_to_be32(4096): | 1327 | case 2048: |
1328 | case 4096: | ||
1325 | break; | 1329 | break; |
1326 | default: | 1330 | default: |
1327 | printk(KERN_ERR "%s: weird block size %u\n", | 1331 | printk(KERN_ERR "%s: weird block size %u\n", |
1328 | drive->name, capbuf.blocklen); | 1332 | drive->name, blocklen); |
1329 | printk(KERN_ERR "%s: default to 2kb block size\n", | 1333 | printk(KERN_ERR "%s: default to 2kb block size\n", |
1330 | drive->name); | 1334 | drive->name); |
1331 | capbuf.blocklen = __constant_cpu_to_be32(2048); | 1335 | blocklen = 2048; |
1332 | break; | 1336 | break; |
1333 | } | 1337 | } |
1334 | 1338 | ||
1335 | *capacity = 1 + be32_to_cpu(capbuf.lba); | 1339 | *capacity = 1 + be32_to_cpu(capbuf.lba); |
1336 | *sectors_per_frame = be32_to_cpu(capbuf.blocklen) >> SECTOR_BITS; | 1340 | *sectors_per_frame = blocklen >> SECTOR_BITS; |
1337 | return 0; | 1341 | return 0; |
1338 | } | 1342 | } |
1339 | 1343 | ||
@@ -1411,8 +1415,8 @@ int ide_cd_read_toc(ide_drive_t *drive, struct request_sense *sense) | |||
1411 | return stat; | 1415 | return stat; |
1412 | 1416 | ||
1413 | if (drive->atapi_flags & IDE_AFLAG_TOCTRACKS_AS_BCD) { | 1417 | if (drive->atapi_flags & IDE_AFLAG_TOCTRACKS_AS_BCD) { |
1414 | toc->hdr.first_track = BCD2BIN(toc->hdr.first_track); | 1418 | toc->hdr.first_track = bcd2bin(toc->hdr.first_track); |
1415 | toc->hdr.last_track = BCD2BIN(toc->hdr.last_track); | 1419 | toc->hdr.last_track = bcd2bin(toc->hdr.last_track); |
1416 | } | 1420 | } |
1417 | 1421 | ||
1418 | ntracks = toc->hdr.last_track - toc->hdr.first_track + 1; | 1422 | ntracks = toc->hdr.last_track - toc->hdr.first_track + 1; |
@@ -1452,8 +1456,8 @@ int ide_cd_read_toc(ide_drive_t *drive, struct request_sense *sense) | |||
1452 | return stat; | 1456 | return stat; |
1453 | 1457 | ||
1454 | if (drive->atapi_flags & IDE_AFLAG_TOCTRACKS_AS_BCD) { | 1458 | if (drive->atapi_flags & IDE_AFLAG_TOCTRACKS_AS_BCD) { |
1455 | toc->hdr.first_track = (u8)BIN2BCD(CDROM_LEADOUT); | 1459 | toc->hdr.first_track = (u8)bin2bcd(CDROM_LEADOUT); |
1456 | toc->hdr.last_track = (u8)BIN2BCD(CDROM_LEADOUT); | 1460 | toc->hdr.last_track = (u8)bin2bcd(CDROM_LEADOUT); |
1457 | } else { | 1461 | } else { |
1458 | toc->hdr.first_track = CDROM_LEADOUT; | 1462 | toc->hdr.first_track = CDROM_LEADOUT; |
1459 | toc->hdr.last_track = CDROM_LEADOUT; | 1463 | toc->hdr.last_track = CDROM_LEADOUT; |
@@ -1466,14 +1470,14 @@ int ide_cd_read_toc(ide_drive_t *drive, struct request_sense *sense) | |||
1466 | toc->hdr.toc_length = be16_to_cpu(toc->hdr.toc_length); | 1470 | toc->hdr.toc_length = be16_to_cpu(toc->hdr.toc_length); |
1467 | 1471 | ||
1468 | if (drive->atapi_flags & IDE_AFLAG_TOCTRACKS_AS_BCD) { | 1472 | if (drive->atapi_flags & IDE_AFLAG_TOCTRACKS_AS_BCD) { |
1469 | toc->hdr.first_track = BCD2BIN(toc->hdr.first_track); | 1473 | toc->hdr.first_track = bcd2bin(toc->hdr.first_track); |
1470 | toc->hdr.last_track = BCD2BIN(toc->hdr.last_track); | 1474 | toc->hdr.last_track = bcd2bin(toc->hdr.last_track); |
1471 | } | 1475 | } |
1472 | 1476 | ||
1473 | for (i = 0; i <= ntracks; i++) { | 1477 | for (i = 0; i <= ntracks; i++) { |
1474 | if (drive->atapi_flags & IDE_AFLAG_TOCADDR_AS_BCD) { | 1478 | if (drive->atapi_flags & IDE_AFLAG_TOCADDR_AS_BCD) { |
1475 | if (drive->atapi_flags & IDE_AFLAG_TOCTRACKS_AS_BCD) | 1479 | if (drive->atapi_flags & IDE_AFLAG_TOCTRACKS_AS_BCD) |
1476 | toc->ent[i].track = BCD2BIN(toc->ent[i].track); | 1480 | toc->ent[i].track = bcd2bin(toc->ent[i].track); |
1477 | msf_from_bcd(&toc->ent[i].addr.msf); | 1481 | msf_from_bcd(&toc->ent[i].addr.msf); |
1478 | } | 1482 | } |
1479 | toc->ent[i].addr.lba = msf_to_lba(toc->ent[i].addr.msf.minute, | 1483 | toc->ent[i].addr.lba = msf_to_lba(toc->ent[i].addr.msf.minute, |
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index 28d85b410f7c..68b9cf0138b0 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c | |||
@@ -65,11 +65,10 @@ static struct ide_disk_obj *ide_disk_get(struct gendisk *disk) | |||
65 | mutex_lock(&idedisk_ref_mutex); | 65 | mutex_lock(&idedisk_ref_mutex); |
66 | idkp = ide_disk_g(disk); | 66 | idkp = ide_disk_g(disk); |
67 | if (idkp) { | 67 | if (idkp) { |
68 | kref_get(&idkp->kref); | 68 | if (ide_device_get(idkp->drive)) |
69 | if (ide_device_get(idkp->drive)) { | ||
70 | kref_put(&idkp->kref, ide_disk_release); | ||
71 | idkp = NULL; | 69 | idkp = NULL; |
72 | } | 70 | else |
71 | kref_get(&idkp->kref); | ||
73 | } | 72 | } |
74 | mutex_unlock(&idedisk_ref_mutex); | 73 | mutex_unlock(&idedisk_ref_mutex); |
75 | return idkp; | 74 | return idkp; |
@@ -77,9 +76,11 @@ static struct ide_disk_obj *ide_disk_get(struct gendisk *disk) | |||
77 | 76 | ||
78 | static void ide_disk_put(struct ide_disk_obj *idkp) | 77 | static void ide_disk_put(struct ide_disk_obj *idkp) |
79 | { | 78 | { |
79 | ide_drive_t *drive = idkp->drive; | ||
80 | |||
80 | mutex_lock(&idedisk_ref_mutex); | 81 | mutex_lock(&idedisk_ref_mutex); |
81 | ide_device_put(idkp->drive); | ||
82 | kref_put(&idkp->kref, ide_disk_release); | 82 | kref_put(&idkp->kref, ide_disk_release); |
83 | ide_device_put(drive); | ||
83 | mutex_unlock(&idedisk_ref_mutex); | 84 | mutex_unlock(&idedisk_ref_mutex); |
84 | } | 85 | } |
85 | 86 | ||
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index 71c377a7bcf2..adc682755857 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c | |||
@@ -649,11 +649,7 @@ static unsigned int ide_get_mode_mask(ide_drive_t *drive, u8 base, u8 req_mode) | |||
649 | if (id->field_valid & 2) { | 649 | if (id->field_valid & 2) { |
650 | mask = id->dma_1word & hwif->swdma_mask; | 650 | mask = id->dma_1word & hwif->swdma_mask; |
651 | } else if (id->tDMA) { | 651 | } else if (id->tDMA) { |
652 | /* | 652 | u8 mode = id->tDMA; |
653 | * ide_fix_driveid() doesn't convert ->tDMA to the | ||
654 | * CPU endianness so we need to do it here | ||
655 | */ | ||
656 | u8 mode = le16_to_cpu(id->tDMA); | ||
657 | 653 | ||
658 | /* | 654 | /* |
659 | * if the mode is valid convert it to the mask | 655 | * if the mode is valid convert it to the mask |
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index ca11a26746f1..e9034c0125f3 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c | |||
@@ -167,11 +167,10 @@ static struct ide_floppy_obj *ide_floppy_get(struct gendisk *disk) | |||
167 | mutex_lock(&idefloppy_ref_mutex); | 167 | mutex_lock(&idefloppy_ref_mutex); |
168 | floppy = ide_floppy_g(disk); | 168 | floppy = ide_floppy_g(disk); |
169 | if (floppy) { | 169 | if (floppy) { |
170 | kref_get(&floppy->kref); | 170 | if (ide_device_get(floppy->drive)) |
171 | if (ide_device_get(floppy->drive)) { | ||
172 | kref_put(&floppy->kref, idefloppy_cleanup_obj); | ||
173 | floppy = NULL; | 171 | floppy = NULL; |
174 | } | 172 | else |
173 | kref_get(&floppy->kref); | ||
175 | } | 174 | } |
176 | mutex_unlock(&idefloppy_ref_mutex); | 175 | mutex_unlock(&idefloppy_ref_mutex); |
177 | return floppy; | 176 | return floppy; |
@@ -179,9 +178,11 @@ static struct ide_floppy_obj *ide_floppy_get(struct gendisk *disk) | |||
179 | 178 | ||
180 | static void ide_floppy_put(struct ide_floppy_obj *floppy) | 179 | static void ide_floppy_put(struct ide_floppy_obj *floppy) |
181 | { | 180 | { |
181 | ide_drive_t *drive = floppy->drive; | ||
182 | |||
182 | mutex_lock(&idefloppy_ref_mutex); | 183 | mutex_lock(&idefloppy_ref_mutex); |
183 | ide_device_put(floppy->drive); | ||
184 | kref_put(&floppy->kref, idefloppy_cleanup_obj); | 184 | kref_put(&floppy->kref, idefloppy_cleanup_obj); |
185 | ide_device_put(drive); | ||
185 | mutex_unlock(&idefloppy_ref_mutex); | 186 | mutex_unlock(&idefloppy_ref_mutex); |
186 | } | 187 | } |
187 | 188 | ||
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index 8aae91764513..2cbadffe922e 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c | |||
@@ -484,11 +484,11 @@ void ide_fix_driveid (struct hd_driveid *id) | |||
484 | for (i = 0; i < 3; i++) | 484 | for (i = 0; i < 3; i++) |
485 | id->words157_159[i] = __le16_to_cpu(id->words157_159[i]); | 485 | id->words157_159[i] = __le16_to_cpu(id->words157_159[i]); |
486 | id->cfa_power = __le16_to_cpu(id->cfa_power); | 486 | id->cfa_power = __le16_to_cpu(id->cfa_power); |
487 | for (i = 0; i < 14; i++) | 487 | for (i = 0; i < 15; i++) |
488 | id->words161_175[i] = __le16_to_cpu(id->words161_175[i]); | 488 | id->words161_175[i] = __le16_to_cpu(id->words161_175[i]); |
489 | for (i = 0; i < 31; i++) | 489 | for (i = 0; i < 30; i++) |
490 | id->words176_205[i] = __le16_to_cpu(id->words176_205[i]); | 490 | id->words176_205[i] = __le16_to_cpu(id->words176_205[i]); |
491 | for (i = 0; i < 48; i++) | 491 | for (i = 0; i < 49; i++) |
492 | id->words206_254[i] = __le16_to_cpu(id->words206_254[i]); | 492 | id->words206_254[i] = __le16_to_cpu(id->words206_254[i]); |
493 | id->integrity_word = __le16_to_cpu(id->integrity_word); | 493 | id->integrity_word = __le16_to_cpu(id->integrity_word); |
494 | # else | 494 | # else |
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 82c2afe4d28a..1bce84b56630 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c | |||
@@ -331,11 +331,10 @@ static struct ide_tape_obj *ide_tape_get(struct gendisk *disk) | |||
331 | mutex_lock(&idetape_ref_mutex); | 331 | mutex_lock(&idetape_ref_mutex); |
332 | tape = ide_tape_g(disk); | 332 | tape = ide_tape_g(disk); |
333 | if (tape) { | 333 | if (tape) { |
334 | kref_get(&tape->kref); | 334 | if (ide_device_get(tape->drive)) |
335 | if (ide_device_get(tape->drive)) { | ||
336 | kref_put(&tape->kref, ide_tape_release); | ||
337 | tape = NULL; | 335 | tape = NULL; |
338 | } | 336 | else |
337 | kref_get(&tape->kref); | ||
339 | } | 338 | } |
340 | mutex_unlock(&idetape_ref_mutex); | 339 | mutex_unlock(&idetape_ref_mutex); |
341 | return tape; | 340 | return tape; |
@@ -343,9 +342,11 @@ static struct ide_tape_obj *ide_tape_get(struct gendisk *disk) | |||
343 | 342 | ||
344 | static void ide_tape_put(struct ide_tape_obj *tape) | 343 | static void ide_tape_put(struct ide_tape_obj *tape) |
345 | { | 344 | { |
345 | ide_drive_t *drive = tape->drive; | ||
346 | |||
346 | mutex_lock(&idetape_ref_mutex); | 347 | mutex_lock(&idetape_ref_mutex); |
347 | ide_device_put(tape->drive); | ||
348 | kref_put(&tape->kref, ide_tape_release); | 348 | kref_put(&tape->kref, ide_tape_release); |
349 | ide_device_put(drive); | ||
349 | mutex_unlock(&idetape_ref_mutex); | 350 | mutex_unlock(&idetape_ref_mutex); |
350 | } | 351 | } |
351 | 352 | ||
diff --git a/drivers/ide/pci/aec62xx.c b/drivers/ide/pci/aec62xx.c index e0c8fe7d9fea..3187215e8f89 100644 --- a/drivers/ide/pci/aec62xx.c +++ b/drivers/ide/pci/aec62xx.c | |||
@@ -160,7 +160,7 @@ static unsigned int __devinit init_chipset_aec62xx(struct pci_dev *dev) | |||
160 | return dev->irq; | 160 | return dev->irq; |
161 | } | 161 | } |
162 | 162 | ||
163 | static u8 __devinit atp86x_cable_detect(ide_hwif_t *hwif) | 163 | static u8 atp86x_cable_detect(ide_hwif_t *hwif) |
164 | { | 164 | { |
165 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 165 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
166 | u8 ata66 = 0, mask = hwif->channel ? 0x02 : 0x01; | 166 | u8 ata66 = 0, mask = hwif->channel ? 0x02 : 0x01; |
@@ -307,7 +307,7 @@ static struct pci_driver driver = { | |||
307 | .name = "AEC62xx_IDE", | 307 | .name = "AEC62xx_IDE", |
308 | .id_table = aec62xx_pci_tbl, | 308 | .id_table = aec62xx_pci_tbl, |
309 | .probe = aec62xx_init_one, | 309 | .probe = aec62xx_init_one, |
310 | .remove = aec62xx_remove, | 310 | .remove = __devexit_p(aec62xx_remove), |
311 | }; | 311 | }; |
312 | 312 | ||
313 | static int __init aec62xx_ide_init(void) | 313 | static int __init aec62xx_ide_init(void) |
diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c index b582687e0cd4..d647526af557 100644 --- a/drivers/ide/pci/alim15x3.c +++ b/drivers/ide/pci/alim15x3.c | |||
@@ -371,7 +371,7 @@ static int ali_cable_override(struct pci_dev *pdev) | |||
371 | * FIXME: frobs bits that are not defined on newer ALi devicea | 371 | * FIXME: frobs bits that are not defined on newer ALi devicea |
372 | */ | 372 | */ |
373 | 373 | ||
374 | static u8 __devinit ali_cable_detect(ide_hwif_t *hwif) | 374 | static u8 ali_cable_detect(ide_hwif_t *hwif) |
375 | { | 375 | { |
376 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 376 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
377 | unsigned long flags; | 377 | unsigned long flags; |
diff --git a/drivers/ide/pci/amd74xx.c b/drivers/ide/pci/amd74xx.c index 2cea7bf51a0f..1e66a960a96a 100644 --- a/drivers/ide/pci/amd74xx.c +++ b/drivers/ide/pci/amd74xx.c | |||
@@ -175,7 +175,7 @@ static unsigned int __devinit init_chipset_amd74xx(struct pci_dev *dev) | |||
175 | return dev->irq; | 175 | return dev->irq; |
176 | } | 176 | } |
177 | 177 | ||
178 | static u8 __devinit amd_cable_detect(ide_hwif_t *hwif) | 178 | static u8 amd_cable_detect(ide_hwif_t *hwif) |
179 | { | 179 | { |
180 | if ((amd_80w >> hwif->channel) & 1) | 180 | if ((amd_80w >> hwif->channel) & 1) |
181 | return ATA_CBL_PATA80; | 181 | return ATA_CBL_PATA80; |
diff --git a/drivers/ide/pci/atiixp.c b/drivers/ide/pci/atiixp.c index 332f08f43b56..41f6cb6c163a 100644 --- a/drivers/ide/pci/atiixp.c +++ b/drivers/ide/pci/atiixp.c | |||
@@ -119,7 +119,7 @@ static void atiixp_set_dma_mode(ide_drive_t *drive, const u8 speed) | |||
119 | spin_unlock_irqrestore(&atiixp_lock, flags); | 119 | spin_unlock_irqrestore(&atiixp_lock, flags); |
120 | } | 120 | } |
121 | 121 | ||
122 | static u8 __devinit atiixp_cable_detect(ide_hwif_t *hwif) | 122 | static u8 atiixp_cable_detect(ide_hwif_t *hwif) |
123 | { | 123 | { |
124 | struct pci_dev *pdev = to_pci_dev(hwif->dev); | 124 | struct pci_dev *pdev = to_pci_dev(hwif->dev); |
125 | u8 udma_mode = 0, ch = hwif->channel; | 125 | u8 udma_mode = 0, ch = hwif->channel; |
diff --git a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c index 1360b4fa9fd3..e064398e03b4 100644 --- a/drivers/ide/pci/cmd64x.c +++ b/drivers/ide/pci/cmd64x.c | |||
@@ -354,7 +354,7 @@ static unsigned int __devinit init_chipset_cmd64x(struct pci_dev *dev) | |||
354 | return 0; | 354 | return 0; |
355 | } | 355 | } |
356 | 356 | ||
357 | static u8 __devinit cmd64x_cable_detect(ide_hwif_t *hwif) | 357 | static u8 cmd64x_cable_detect(ide_hwif_t *hwif) |
358 | { | 358 | { |
359 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 359 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
360 | u8 bmidecsr = 0, mask = hwif->channel ? 0x02 : 0x01; | 360 | u8 bmidecsr = 0, mask = hwif->channel ? 0x02 : 0x01; |
diff --git a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c index c0364b287f17..151844fcbb07 100644 --- a/drivers/ide/pci/cs5520.c +++ b/drivers/ide/pci/cs5520.c | |||
@@ -96,6 +96,7 @@ static const struct ide_port_ops cs5520_port_ops = { | |||
96 | 96 | ||
97 | static const struct ide_port_info cyrix_chipset __devinitdata = { | 97 | static const struct ide_port_info cyrix_chipset __devinitdata = { |
98 | .name = DRV_NAME, | 98 | .name = DRV_NAME, |
99 | .enablebits = { { 0x60, 0x01, 0x01 }, { 0x60, 0x02, 0x02 } }, | ||
99 | .port_ops = &cs5520_port_ops, | 100 | .port_ops = &cs5520_port_ops, |
100 | .host_flags = IDE_HFLAG_ISA_PORTS | IDE_HFLAG_CS5520, | 101 | .host_flags = IDE_HFLAG_ISA_PORTS | IDE_HFLAG_CS5520, |
101 | .pio_mask = ATA_PIO4, | 102 | .pio_mask = ATA_PIO4, |
diff --git a/drivers/ide/pci/cs5535.c b/drivers/ide/pci/cs5535.c index f7b50cdeefa6..dd3dc23af995 100644 --- a/drivers/ide/pci/cs5535.c +++ b/drivers/ide/pci/cs5535.c | |||
@@ -153,7 +153,7 @@ static void cs5535_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
153 | cs5535_set_speed(drive, XFER_PIO_0 + pio); | 153 | cs5535_set_speed(drive, XFER_PIO_0 + pio); |
154 | } | 154 | } |
155 | 155 | ||
156 | static u8 __devinit cs5535_cable_detect(ide_hwif_t *hwif) | 156 | static u8 cs5535_cable_detect(ide_hwif_t *hwif) |
157 | { | 157 | { |
158 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 158 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
159 | u8 bit; | 159 | u8 bit; |
diff --git a/drivers/ide/pci/cy82c693.c b/drivers/ide/pci/cy82c693.c index bfae2f882f48..e6d8ee88d56d 100644 --- a/drivers/ide/pci/cy82c693.c +++ b/drivers/ide/pci/cy82c693.c | |||
@@ -447,7 +447,7 @@ static struct pci_driver driver = { | |||
447 | .name = "Cypress_IDE", | 447 | .name = "Cypress_IDE", |
448 | .id_table = cy82c693_pci_tbl, | 448 | .id_table = cy82c693_pci_tbl, |
449 | .probe = cy82c693_init_one, | 449 | .probe = cy82c693_init_one, |
450 | .remove = cy82c693_remove, | 450 | .remove = __devexit_p(cy82c693_remove), |
451 | }; | 451 | }; |
452 | 452 | ||
453 | static int __init cy82c693_ide_init(void) | 453 | static int __init cy82c693_ide_init(void) |
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c index 5271b246b88c..eb107eef0dbc 100644 --- a/drivers/ide/pci/hpt366.c +++ b/drivers/ide/pci/hpt366.c | |||
@@ -1214,7 +1214,7 @@ static unsigned int __devinit init_chipset_hpt366(struct pci_dev *dev) | |||
1214 | return dev->irq; | 1214 | return dev->irq; |
1215 | } | 1215 | } |
1216 | 1216 | ||
1217 | static u8 __devinit hpt3xx_cable_detect(ide_hwif_t *hwif) | 1217 | static u8 hpt3xx_cable_detect(ide_hwif_t *hwif) |
1218 | { | 1218 | { |
1219 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 1219 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
1220 | struct ide_host *host = pci_get_drvdata(dev); | 1220 | struct ide_host *host = pci_get_drvdata(dev); |
@@ -1620,7 +1620,7 @@ static struct pci_driver driver = { | |||
1620 | .name = "HPT366_IDE", | 1620 | .name = "HPT366_IDE", |
1621 | .id_table = hpt366_pci_tbl, | 1621 | .id_table = hpt366_pci_tbl, |
1622 | .probe = hpt366_init_one, | 1622 | .probe = hpt366_init_one, |
1623 | .remove = hpt366_remove, | 1623 | .remove = __devexit_p(hpt366_remove), |
1624 | }; | 1624 | }; |
1625 | 1625 | ||
1626 | static int __init hpt366_ide_init(void) | 1626 | static int __init hpt366_ide_init(void) |
diff --git a/drivers/ide/pci/it8213.c b/drivers/ide/pci/it8213.c index 6eba8f188264..652e47dd7e89 100644 --- a/drivers/ide/pci/it8213.c +++ b/drivers/ide/pci/it8213.c | |||
@@ -141,7 +141,7 @@ static void it8213_set_dma_mode(ide_drive_t *drive, const u8 speed) | |||
141 | } | 141 | } |
142 | } | 142 | } |
143 | 143 | ||
144 | static u8 __devinit it8213_cable_detect(ide_hwif_t *hwif) | 144 | static u8 it8213_cable_detect(ide_hwif_t *hwif) |
145 | { | 145 | { |
146 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 146 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
147 | u8 reg42h = 0; | 147 | u8 reg42h = 0; |
diff --git a/drivers/ide/pci/it821x.c b/drivers/ide/pci/it821x.c index e16a1d113a2a..4a1508a707cc 100644 --- a/drivers/ide/pci/it821x.c +++ b/drivers/ide/pci/it821x.c | |||
@@ -428,7 +428,7 @@ static void it821x_set_dma_mode(ide_drive_t *drive, const u8 speed) | |||
428 | * the needed logic onboard. | 428 | * the needed logic onboard. |
429 | */ | 429 | */ |
430 | 430 | ||
431 | static u8 __devinit it821x_cable_detect(ide_hwif_t *hwif) | 431 | static u8 it821x_cable_detect(ide_hwif_t *hwif) |
432 | { | 432 | { |
433 | /* The reference driver also only does disk side */ | 433 | /* The reference driver also only does disk side */ |
434 | return ATA_CBL_PATA80; | 434 | return ATA_CBL_PATA80; |
@@ -443,7 +443,7 @@ static u8 __devinit it821x_cable_detect(ide_hwif_t *hwif) | |||
443 | * final tuning that is needed, or fixups to work around bugs. | 443 | * final tuning that is needed, or fixups to work around bugs. |
444 | */ | 444 | */ |
445 | 445 | ||
446 | static void __devinit it821x_quirkproc(ide_drive_t *drive) | 446 | static void it821x_quirkproc(ide_drive_t *drive) |
447 | { | 447 | { |
448 | struct it821x_dev *itdev = ide_get_hwifdata(drive->hwif); | 448 | struct it821x_dev *itdev = ide_get_hwifdata(drive->hwif); |
449 | struct hd_driveid *id = drive->id; | 449 | struct hd_driveid *id = drive->id; |
@@ -686,7 +686,7 @@ static struct pci_driver driver = { | |||
686 | .name = "ITE821x IDE", | 686 | .name = "ITE821x IDE", |
687 | .id_table = it821x_pci_tbl, | 687 | .id_table = it821x_pci_tbl, |
688 | .probe = it821x_init_one, | 688 | .probe = it821x_init_one, |
689 | .remove = it821x_remove, | 689 | .remove = __devexit_p(it821x_remove), |
690 | }; | 690 | }; |
691 | 691 | ||
692 | static int __init it821x_ide_init(void) | 692 | static int __init it821x_ide_init(void) |
diff --git a/drivers/ide/pci/jmicron.c b/drivers/ide/pci/jmicron.c index 545b6e172d9b..bb9d09d8f196 100644 --- a/drivers/ide/pci/jmicron.c +++ b/drivers/ide/pci/jmicron.c | |||
@@ -27,7 +27,7 @@ typedef enum { | |||
27 | * Returns the cable type. | 27 | * Returns the cable type. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | static u8 __devinit jmicron_cable_detect(ide_hwif_t *hwif) | 30 | static u8 jmicron_cable_detect(ide_hwif_t *hwif) |
31 | { | 31 | { |
32 | struct pci_dev *pdev = to_pci_dev(hwif->dev); | 32 | struct pci_dev *pdev = to_pci_dev(hwif->dev); |
33 | 33 | ||
diff --git a/drivers/ide/pci/pdc202xx_new.c b/drivers/ide/pci/pdc202xx_new.c index 998615fa285f..d477da6b5858 100644 --- a/drivers/ide/pci/pdc202xx_new.c +++ b/drivers/ide/pci/pdc202xx_new.c | |||
@@ -193,7 +193,7 @@ static void pdcnew_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
193 | } | 193 | } |
194 | } | 194 | } |
195 | 195 | ||
196 | static u8 __devinit pdcnew_cable_detect(ide_hwif_t *hwif) | 196 | static u8 pdcnew_cable_detect(ide_hwif_t *hwif) |
197 | { | 197 | { |
198 | if (get_indexed_reg(hwif, 0x0b) & 0x04) | 198 | if (get_indexed_reg(hwif, 0x0b) & 0x04) |
199 | return ATA_CBL_PATA40; | 199 | return ATA_CBL_PATA40; |
@@ -566,7 +566,7 @@ static struct pci_driver driver = { | |||
566 | .name = "Promise_IDE", | 566 | .name = "Promise_IDE", |
567 | .id_table = pdc202new_pci_tbl, | 567 | .id_table = pdc202new_pci_tbl, |
568 | .probe = pdc202new_init_one, | 568 | .probe = pdc202new_init_one, |
569 | .remove = pdc202new_remove, | 569 | .remove = __devexit_p(pdc202new_remove), |
570 | }; | 570 | }; |
571 | 571 | ||
572 | static int __init pdc202new_ide_init(void) | 572 | static int __init pdc202new_ide_init(void) |
diff --git a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c index 6ff2def58da0..de9a27400462 100644 --- a/drivers/ide/pci/pdc202xx_old.c +++ b/drivers/ide/pci/pdc202xx_old.c | |||
@@ -117,7 +117,7 @@ static void pdc202xx_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
117 | pdc202xx_set_mode(drive, XFER_PIO_0 + pio); | 117 | pdc202xx_set_mode(drive, XFER_PIO_0 + pio); |
118 | } | 118 | } |
119 | 119 | ||
120 | static u8 __devinit pdc2026x_cable_detect(ide_hwif_t *hwif) | 120 | static u8 pdc2026x_cable_detect(ide_hwif_t *hwif) |
121 | { | 121 | { |
122 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 122 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
123 | u16 CIS, mask = hwif->channel ? (1 << 11) : (1 << 10); | 123 | u16 CIS, mask = hwif->channel ? (1 << 11) : (1 << 10); |
diff --git a/drivers/ide/pci/piix.c b/drivers/ide/pci/piix.c index 7fc3022dcf68..30cfc815fe31 100644 --- a/drivers/ide/pci/piix.c +++ b/drivers/ide/pci/piix.c | |||
@@ -256,7 +256,7 @@ static const struct ich_laptop ich_laptop[] = { | |||
256 | { 0, } | 256 | { 0, } |
257 | }; | 257 | }; |
258 | 258 | ||
259 | static u8 __devinit piix_cable_detect(ide_hwif_t *hwif) | 259 | static u8 piix_cable_detect(ide_hwif_t *hwif) |
260 | { | 260 | { |
261 | struct pci_dev *pdev = to_pci_dev(hwif->dev); | 261 | struct pci_dev *pdev = to_pci_dev(hwif->dev); |
262 | const struct ich_laptop *lap = &ich_laptop[0]; | 262 | const struct ich_laptop *lap = &ich_laptop[0]; |
diff --git a/drivers/ide/pci/scc_pata.c b/drivers/ide/pci/scc_pata.c index 94a7ab864236..44cccd1e086a 100644 --- a/drivers/ide/pci/scc_pata.c +++ b/drivers/ide/pci/scc_pata.c | |||
@@ -827,7 +827,7 @@ static void __devinit init_iops_scc(ide_hwif_t *hwif) | |||
827 | init_mmio_iops_scc(hwif); | 827 | init_mmio_iops_scc(hwif); |
828 | } | 828 | } |
829 | 829 | ||
830 | static u8 __devinit scc_cable_detect(ide_hwif_t *hwif) | 830 | static u8 scc_cable_detect(ide_hwif_t *hwif) |
831 | { | 831 | { |
832 | return ATA_CBL_PATA80; | 832 | return ATA_CBL_PATA80; |
833 | } | 833 | } |
@@ -954,7 +954,7 @@ static struct pci_driver driver = { | |||
954 | .name = "SCC IDE", | 954 | .name = "SCC IDE", |
955 | .id_table = scc_pci_tbl, | 955 | .id_table = scc_pci_tbl, |
956 | .probe = scc_init_one, | 956 | .probe = scc_init_one, |
957 | .remove = scc_remove, | 957 | .remove = __devexit_p(scc_remove), |
958 | }; | 958 | }; |
959 | 959 | ||
960 | static int scc_ide_init(void) | 960 | static int scc_ide_init(void) |
diff --git a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c index d173f2937722..c3bdc6e51a48 100644 --- a/drivers/ide/pci/serverworks.c +++ b/drivers/ide/pci/serverworks.c | |||
@@ -272,7 +272,7 @@ static unsigned int __devinit init_chipset_svwks(struct pci_dev *dev) | |||
272 | return dev->irq; | 272 | return dev->irq; |
273 | } | 273 | } |
274 | 274 | ||
275 | static u8 __devinit ata66_svwks_svwks(ide_hwif_t *hwif) | 275 | static u8 ata66_svwks_svwks(ide_hwif_t *hwif) |
276 | { | 276 | { |
277 | return ATA_CBL_PATA80; | 277 | return ATA_CBL_PATA80; |
278 | } | 278 | } |
@@ -284,7 +284,7 @@ static u8 __devinit ata66_svwks_svwks(ide_hwif_t *hwif) | |||
284 | * Bit 14 clear = primary IDE channel does not have 80-pin cable. | 284 | * Bit 14 clear = primary IDE channel does not have 80-pin cable. |
285 | * Bit 14 set = primary IDE channel has 80-pin cable. | 285 | * Bit 14 set = primary IDE channel has 80-pin cable. |
286 | */ | 286 | */ |
287 | static u8 __devinit ata66_svwks_dell(ide_hwif_t *hwif) | 287 | static u8 ata66_svwks_dell(ide_hwif_t *hwif) |
288 | { | 288 | { |
289 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 289 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
290 | 290 | ||
@@ -303,7 +303,7 @@ static u8 __devinit ata66_svwks_dell(ide_hwif_t *hwif) | |||
303 | * | 303 | * |
304 | * WARNING: this only works on Alpine hardware! | 304 | * WARNING: this only works on Alpine hardware! |
305 | */ | 305 | */ |
306 | static u8 __devinit ata66_svwks_cobalt(ide_hwif_t *hwif) | 306 | static u8 ata66_svwks_cobalt(ide_hwif_t *hwif) |
307 | { | 307 | { |
308 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 308 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
309 | 309 | ||
@@ -315,7 +315,7 @@ static u8 __devinit ata66_svwks_cobalt(ide_hwif_t *hwif) | |||
315 | return ATA_CBL_PATA40; | 315 | return ATA_CBL_PATA40; |
316 | } | 316 | } |
317 | 317 | ||
318 | static u8 __devinit svwks_cable_detect(ide_hwif_t *hwif) | 318 | static u8 svwks_cable_detect(ide_hwif_t *hwif) |
319 | { | 319 | { |
320 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 320 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
321 | 321 | ||
diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c index 42eef19a18f1..681306c9d79b 100644 --- a/drivers/ide/pci/sgiioc4.c +++ b/drivers/ide/pci/sgiioc4.c | |||
@@ -621,9 +621,9 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev) | |||
621 | if (!request_mem_region(cmd_phys_base, IOC4_CMD_CTL_BLK_SIZE, | 621 | if (!request_mem_region(cmd_phys_base, IOC4_CMD_CTL_BLK_SIZE, |
622 | DRV_NAME)) { | 622 | DRV_NAME)) { |
623 | printk(KERN_ERR | 623 | printk(KERN_ERR |
624 | "%s : %s -- ERROR, Addresses " | 624 | "%s %s: -- ERROR, Addresses " |
625 | "0x%p to 0x%p ALREADY in use\n", | 625 | "0x%p to 0x%p ALREADY in use\n", |
626 | __func__, DRV_NAME, (void *) cmd_phys_base, | 626 | DRV_NAME, pci_name(dev), (void *)cmd_phys_base, |
627 | (void *) cmd_phys_base + IOC4_CMD_CTL_BLK_SIZE); | 627 | (void *) cmd_phys_base + IOC4_CMD_CTL_BLK_SIZE); |
628 | return -ENOMEM; | 628 | return -ENOMEM; |
629 | } | 629 | } |
diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c index b8ad9ad6cf0d..db2b88a369ab 100644 --- a/drivers/ide/pci/siimage.c +++ b/drivers/ide/pci/siimage.c | |||
@@ -639,7 +639,7 @@ static int is_dev_seagate_sata(ide_drive_t *drive) | |||
639 | * that can occur before we know what drives are present. | 639 | * that can occur before we know what drives are present. |
640 | */ | 640 | */ |
641 | 641 | ||
642 | static void __devinit sil_quirkproc(ide_drive_t *drive) | 642 | static void sil_quirkproc(ide_drive_t *drive) |
643 | { | 643 | { |
644 | ide_hwif_t *hwif = drive->hwif; | 644 | ide_hwif_t *hwif = drive->hwif; |
645 | 645 | ||
@@ -679,7 +679,7 @@ static void __devinit init_iops_siimage(ide_hwif_t *hwif) | |||
679 | * Check for the presence of an ATA66 capable cable on the interface. | 679 | * Check for the presence of an ATA66 capable cable on the interface. |
680 | */ | 680 | */ |
681 | 681 | ||
682 | static u8 __devinit sil_cable_detect(ide_hwif_t *hwif) | 682 | static u8 sil_cable_detect(ide_hwif_t *hwif) |
683 | { | 683 | { |
684 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 684 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
685 | unsigned long addr = siimage_selreg(hwif, 0); | 685 | unsigned long addr = siimage_selreg(hwif, 0); |
@@ -832,7 +832,7 @@ static struct pci_driver driver = { | |||
832 | .name = "SiI_IDE", | 832 | .name = "SiI_IDE", |
833 | .id_table = siimage_pci_tbl, | 833 | .id_table = siimage_pci_tbl, |
834 | .probe = siimage_init_one, | 834 | .probe = siimage_init_one, |
835 | .remove = siimage_remove, | 835 | .remove = __devexit_p(siimage_remove), |
836 | }; | 836 | }; |
837 | 837 | ||
838 | static int __init siimage_ide_init(void) | 838 | static int __init siimage_ide_init(void) |
diff --git a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c index cc95f90b53b7..5efe21d6ef97 100644 --- a/drivers/ide/pci/sis5513.c +++ b/drivers/ide/pci/sis5513.c | |||
@@ -518,7 +518,7 @@ static const struct sis_laptop sis_laptop[] = { | |||
518 | { 0, } | 518 | { 0, } |
519 | }; | 519 | }; |
520 | 520 | ||
521 | static u8 __devinit sis_cable_detect(ide_hwif_t *hwif) | 521 | static u8 sis_cable_detect(ide_hwif_t *hwif) |
522 | { | 522 | { |
523 | struct pci_dev *pdev = to_pci_dev(hwif->dev); | 523 | struct pci_dev *pdev = to_pci_dev(hwif->dev); |
524 | const struct sis_laptop *lap = &sis_laptop[0]; | 524 | const struct sis_laptop *lap = &sis_laptop[0]; |
@@ -610,7 +610,7 @@ static struct pci_driver driver = { | |||
610 | .name = "SIS_IDE", | 610 | .name = "SIS_IDE", |
611 | .id_table = sis5513_pci_tbl, | 611 | .id_table = sis5513_pci_tbl, |
612 | .probe = sis5513_init_one, | 612 | .probe = sis5513_init_one, |
613 | .remove = sis5513_remove, | 613 | .remove = __devexit_p(sis5513_remove), |
614 | }; | 614 | }; |
615 | 615 | ||
616 | static int __init sis5513_ide_init(void) | 616 | static int __init sis5513_ide_init(void) |
diff --git a/drivers/ide/pci/slc90e66.c b/drivers/ide/pci/slc90e66.c index 13d1fa491f26..866d6c65e3a0 100644 --- a/drivers/ide/pci/slc90e66.c +++ b/drivers/ide/pci/slc90e66.c | |||
@@ -116,7 +116,7 @@ static void slc90e66_set_dma_mode(ide_drive_t *drive, const u8 speed) | |||
116 | } | 116 | } |
117 | } | 117 | } |
118 | 118 | ||
119 | static u8 __devinit slc90e66_cable_detect(ide_hwif_t *hwif) | 119 | static u8 slc90e66_cable_detect(ide_hwif_t *hwif) |
120 | { | 120 | { |
121 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 121 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
122 | u8 reg47 = 0, mask = hwif->channel ? 0x01 : 0x02; | 122 | u8 reg47 = 0, mask = hwif->channel ? 0x01 : 0x02; |
diff --git a/drivers/ide/pci/tc86c001.c b/drivers/ide/pci/tc86c001.c index b1cb8a9ce5a9..927277c54ec9 100644 --- a/drivers/ide/pci/tc86c001.c +++ b/drivers/ide/pci/tc86c001.c | |||
@@ -131,7 +131,7 @@ static void tc86c001_dma_start(ide_drive_t *drive) | |||
131 | ide_dma_start(drive); | 131 | ide_dma_start(drive); |
132 | } | 132 | } |
133 | 133 | ||
134 | static u8 __devinit tc86c001_cable_detect(ide_hwif_t *hwif) | 134 | static u8 tc86c001_cable_detect(ide_hwif_t *hwif) |
135 | { | 135 | { |
136 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 136 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
137 | unsigned long sc_base = pci_resource_start(dev, 5); | 137 | unsigned long sc_base = pci_resource_start(dev, 5); |
@@ -249,7 +249,7 @@ static struct pci_driver driver = { | |||
249 | .name = "TC86C001", | 249 | .name = "TC86C001", |
250 | .id_table = tc86c001_pci_tbl, | 250 | .id_table = tc86c001_pci_tbl, |
251 | .probe = tc86c001_init_one, | 251 | .probe = tc86c001_init_one, |
252 | .remove = tc86c001_remove, | 252 | .remove = __devexit_p(tc86c001_remove), |
253 | }; | 253 | }; |
254 | 254 | ||
255 | static int __init tc86c001_ide_init(void) | 255 | static int __init tc86c001_ide_init(void) |
diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c index 454d2bf62dce..94fb9ab3223f 100644 --- a/drivers/ide/pci/via82cxxx.c +++ b/drivers/ide/pci/via82cxxx.c | |||
@@ -352,7 +352,7 @@ static int via_cable_override(struct pci_dev *pdev) | |||
352 | return 0; | 352 | return 0; |
353 | } | 353 | } |
354 | 354 | ||
355 | static u8 __devinit via82cxxx_cable_detect(ide_hwif_t *hwif) | 355 | static u8 via82cxxx_cable_detect(ide_hwif_t *hwif) |
356 | { | 356 | { |
357 | struct pci_dev *pdev = to_pci_dev(hwif->dev); | 357 | struct pci_dev *pdev = to_pci_dev(hwif->dev); |
358 | struct ide_host *host = pci_get_drvdata(pdev); | 358 | struct ide_host *host = pci_get_drvdata(pdev); |
@@ -491,7 +491,7 @@ static struct pci_driver driver = { | |||
491 | .name = "VIA_IDE", | 491 | .name = "VIA_IDE", |
492 | .id_table = via_pci_tbl, | 492 | .id_table = via_pci_tbl, |
493 | .probe = via_init_one, | 493 | .probe = via_init_one, |
494 | .remove = via_remove, | 494 | .remove = __devexit_p(via_remove), |
495 | }; | 495 | }; |
496 | 496 | ||
497 | static int __init via_ide_init(void) | 497 | static int __init via_ide_init(void) |
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c index c521bf6e1bf2..fa2be26272d5 100644 --- a/drivers/ide/ppc/pmac.c +++ b/drivers/ide/ppc/pmac.c | |||
@@ -1086,6 +1086,11 @@ static int __devinit pmac_ide_setup_device(pmac_ide_hwif_t *pmif, hw_regs_t *hw) | |||
1086 | /* Make sure we have sane timings */ | 1086 | /* Make sure we have sane timings */ |
1087 | sanitize_timings(pmif); | 1087 | sanitize_timings(pmif); |
1088 | 1088 | ||
1089 | host = ide_host_alloc(&d, hws); | ||
1090 | if (host == NULL) | ||
1091 | return -ENOMEM; | ||
1092 | hwif = host->ports[0]; | ||
1093 | |||
1089 | #ifndef CONFIG_PPC64 | 1094 | #ifndef CONFIG_PPC64 |
1090 | /* XXX FIXME: Media bay stuff need re-organizing */ | 1095 | /* XXX FIXME: Media bay stuff need re-organizing */ |
1091 | if (np->parent && np->parent->name | 1096 | if (np->parent && np->parent->name |
@@ -1119,11 +1124,11 @@ static int __devinit pmac_ide_setup_device(pmac_ide_hwif_t *pmif, hw_regs_t *hw) | |||
1119 | pmif->mdev ? "macio" : "PCI", pmif->aapl_bus_id, | 1124 | pmif->mdev ? "macio" : "PCI", pmif->aapl_bus_id, |
1120 | pmif->mediabay ? " (mediabay)" : "", hw->irq); | 1125 | pmif->mediabay ? " (mediabay)" : "", hw->irq); |
1121 | 1126 | ||
1122 | rc = ide_host_add(&d, hws, &host); | 1127 | rc = ide_host_register(host, &d, hws); |
1123 | if (rc) | 1128 | if (rc) { |
1129 | ide_host_free(host); | ||
1124 | return rc; | 1130 | return rc; |
1125 | 1131 | } | |
1126 | hwif = host->ports[0]; | ||
1127 | 1132 | ||
1128 | return 0; | 1133 | return 0; |
1129 | } | 1134 | } |