aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-05-23 01:08:32 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-23 01:08:32 -0400
commitd798f7f080805ad7e15fc37a43d8c6f91edb6dda (patch)
tree73e3783cb619d3a5dc40a5f32859f063b5cd0664 /drivers/ide
parente98bae7592a44bdce2e49ccd64f3c7ffe244a0f6 (diff)
parentdb210f824c2f155703edf03bc2137da1bd76e27d (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6: ide/ide-scan-pci.c: Use for_each_pci_dev(). ide: Use linux/mutex.h IDE: ide-floppy, remove unnecessary NULL check drivers/ide/pmac.c: Remove unnecessary casts of pci_get_drvdata ide: fix use after free in ide-acpi
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-acpi.c4
-rw-r--r--drivers/ide/ide-floppy.c2
-rw-r--r--drivers/ide/ide-scan-pci.c2
-rw-r--r--drivers/ide/pmac.c4
4 files changed, 6 insertions, 6 deletions
diff --git a/drivers/ide/ide-acpi.c b/drivers/ide/ide-acpi.c
index c26c11905ff..2af8cb460a3 100644
--- a/drivers/ide/ide-acpi.c
+++ b/drivers/ide/ide-acpi.c
@@ -416,21 +416,21 @@ void ide_acpi_get_timing(ide_hwif_t *hwif)
416 416
417 out_obj = output.pointer; 417 out_obj = output.pointer;
418 if (out_obj->type != ACPI_TYPE_BUFFER) { 418 if (out_obj->type != ACPI_TYPE_BUFFER) {
419 kfree(output.pointer);
420 DEBPRINT("Run _GTM: error: " 419 DEBPRINT("Run _GTM: error: "
421 "expected object type of ACPI_TYPE_BUFFER, " 420 "expected object type of ACPI_TYPE_BUFFER, "
422 "got 0x%x\n", out_obj->type); 421 "got 0x%x\n", out_obj->type);
422 kfree(output.pointer);
423 return; 423 return;
424 } 424 }
425 425
426 if (!out_obj->buffer.length || !out_obj->buffer.pointer || 426 if (!out_obj->buffer.length || !out_obj->buffer.pointer ||
427 out_obj->buffer.length != sizeof(struct GTM_buffer)) { 427 out_obj->buffer.length != sizeof(struct GTM_buffer)) {
428 kfree(output.pointer);
429 printk(KERN_ERR 428 printk(KERN_ERR
430 "%s: unexpected _GTM length (0x%x)[should be 0x%zx] or " 429 "%s: unexpected _GTM length (0x%x)[should be 0x%zx] or "
431 "addr (0x%p)\n", 430 "addr (0x%p)\n",
432 __func__, out_obj->buffer.length, 431 __func__, out_obj->buffer.length,
433 sizeof(struct GTM_buffer), out_obj->buffer.pointer); 432 sizeof(struct GTM_buffer), out_obj->buffer.pointer);
433 kfree(output.pointer);
434 return; 434 return;
435 } 435 }
436 436
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index 5a702d02c84..61fdf544fbd 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -73,7 +73,7 @@ static int ide_floppy_callback(ide_drive_t *drive, int dsc)
73 drive->failed_pc = NULL; 73 drive->failed_pc = NULL;
74 74
75 if (pc->c[0] == GPCMD_READ_10 || pc->c[0] == GPCMD_WRITE_10 || 75 if (pc->c[0] == GPCMD_READ_10 || pc->c[0] == GPCMD_WRITE_10 ||
76 (rq && rq->cmd_type == REQ_TYPE_BLOCK_PC)) 76 rq->cmd_type == REQ_TYPE_BLOCK_PC)
77 uptodate = 1; /* FIXME */ 77 uptodate = 1; /* FIXME */
78 else if (pc->c[0] == GPCMD_REQUEST_SENSE) { 78 else if (pc->c[0] == GPCMD_REQUEST_SENSE) {
79 79
diff --git a/drivers/ide/ide-scan-pci.c b/drivers/ide/ide-scan-pci.c
index 0e79efff1de..c3da53e7bb2 100644
--- a/drivers/ide/ide-scan-pci.c
+++ b/drivers/ide/ide-scan-pci.c
@@ -88,7 +88,7 @@ static int __init ide_scan_pcibus(void)
88 struct list_head *l, *n; 88 struct list_head *l, *n;
89 89
90 pre_init = 0; 90 pre_init = 0;
91 while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev))) 91 for_each_pci_dev(dev)
92 ide_scan_pcidev(dev); 92 ide_scan_pcidev(dev);
93 93
94 /* 94 /*
diff --git a/drivers/ide/pmac.c b/drivers/ide/pmac.c
index ebcf8e470a9..1db7c4368db 100644
--- a/drivers/ide/pmac.c
+++ b/drivers/ide/pmac.c
@@ -1334,7 +1334,7 @@ out_free_pmif:
1334static int 1334static int
1335pmac_ide_pci_suspend(struct pci_dev *pdev, pm_message_t mesg) 1335pmac_ide_pci_suspend(struct pci_dev *pdev, pm_message_t mesg)
1336{ 1336{
1337 pmac_ide_hwif_t *pmif = (pmac_ide_hwif_t *)pci_get_drvdata(pdev); 1337 pmac_ide_hwif_t *pmif = pci_get_drvdata(pdev);
1338 int rc = 0; 1338 int rc = 0;
1339 1339
1340 if (mesg.event != pdev->dev.power.power_state.event 1340 if (mesg.event != pdev->dev.power.power_state.event
@@ -1350,7 +1350,7 @@ pmac_ide_pci_suspend(struct pci_dev *pdev, pm_message_t mesg)
1350static int 1350static int
1351pmac_ide_pci_resume(struct pci_dev *pdev) 1351pmac_ide_pci_resume(struct pci_dev *pdev)
1352{ 1352{
1353 pmac_ide_hwif_t *pmif = (pmac_ide_hwif_t *)pci_get_drvdata(pdev); 1353 pmac_ide_hwif_t *pmif = pci_get_drvdata(pdev);
1354 int rc = 0; 1354 int rc = 0;
1355 1355
1356 if (pdev->dev.power.power_state.event != PM_EVENT_ON) { 1356 if (pdev->dev.power.power_state.event != PM_EVENT_ON) {