Commit d798f7f0 authored by Linus Torvalds's avatar Linus Torvalds

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
parents e98bae75 db210f82
...@@ -416,21 +416,21 @@ void ide_acpi_get_timing(ide_hwif_t *hwif) ...@@ -416,21 +416,21 @@ void ide_acpi_get_timing(ide_hwif_t *hwif)
out_obj = output.pointer; out_obj = output.pointer;
if (out_obj->type != ACPI_TYPE_BUFFER) { if (out_obj->type != ACPI_TYPE_BUFFER) {
kfree(output.pointer);
DEBPRINT("Run _GTM: error: " DEBPRINT("Run _GTM: error: "
"expected object type of ACPI_TYPE_BUFFER, " "expected object type of ACPI_TYPE_BUFFER, "
"got 0x%x\n", out_obj->type); "got 0x%x\n", out_obj->type);
kfree(output.pointer);
return; return;
} }
if (!out_obj->buffer.length || !out_obj->buffer.pointer || if (!out_obj->buffer.length || !out_obj->buffer.pointer ||
out_obj->buffer.length != sizeof(struct GTM_buffer)) { out_obj->buffer.length != sizeof(struct GTM_buffer)) {
kfree(output.pointer);
printk(KERN_ERR printk(KERN_ERR
"%s: unexpected _GTM length (0x%x)[should be 0x%zx] or " "%s: unexpected _GTM length (0x%x)[should be 0x%zx] or "
"addr (0x%p)\n", "addr (0x%p)\n",
__func__, out_obj->buffer.length, __func__, out_obj->buffer.length,
sizeof(struct GTM_buffer), out_obj->buffer.pointer); sizeof(struct GTM_buffer), out_obj->buffer.pointer);
kfree(output.pointer);
return; return;
} }
......
...@@ -73,7 +73,7 @@ static int ide_floppy_callback(ide_drive_t *drive, int dsc) ...@@ -73,7 +73,7 @@ static int ide_floppy_callback(ide_drive_t *drive, int dsc)
drive->failed_pc = NULL; drive->failed_pc = NULL;
if (pc->c[0] == GPCMD_READ_10 || pc->c[0] == GPCMD_WRITE_10 || if (pc->c[0] == GPCMD_READ_10 || pc->c[0] == GPCMD_WRITE_10 ||
(rq && rq->cmd_type == REQ_TYPE_BLOCK_PC)) rq->cmd_type == REQ_TYPE_BLOCK_PC)
uptodate = 1; /* FIXME */ uptodate = 1; /* FIXME */
else if (pc->c[0] == GPCMD_REQUEST_SENSE) { else if (pc->c[0] == GPCMD_REQUEST_SENSE) {
......
...@@ -88,7 +88,7 @@ static int __init ide_scan_pcibus(void) ...@@ -88,7 +88,7 @@ static int __init ide_scan_pcibus(void)
struct list_head *l, *n; struct list_head *l, *n;
pre_init = 0; pre_init = 0;
while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev))) for_each_pci_dev(dev)
ide_scan_pcidev(dev); ide_scan_pcidev(dev);
/* /*
......
...@@ -1334,7 +1334,7 @@ pmac_ide_pci_attach(struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -1334,7 +1334,7 @@ pmac_ide_pci_attach(struct pci_dev *pdev, const struct pci_device_id *id)
static int static int
pmac_ide_pci_suspend(struct pci_dev *pdev, pm_message_t mesg) pmac_ide_pci_suspend(struct pci_dev *pdev, pm_message_t mesg)
{ {
pmac_ide_hwif_t *pmif = (pmac_ide_hwif_t *)pci_get_drvdata(pdev); pmac_ide_hwif_t *pmif = pci_get_drvdata(pdev);
int rc = 0; int rc = 0;
if (mesg.event != pdev->dev.power.power_state.event 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) ...@@ -1350,7 +1350,7 @@ pmac_ide_pci_suspend(struct pci_dev *pdev, pm_message_t mesg)
static int static int
pmac_ide_pci_resume(struct pci_dev *pdev) pmac_ide_pci_resume(struct pci_dev *pdev)
{ {
pmac_ide_hwif_t *pmif = (pmac_ide_hwif_t *)pci_get_drvdata(pdev); pmac_ide_hwif_t *pmif = pci_get_drvdata(pdev);
int rc = 0; int rc = 0;
if (pdev->dev.power.power_state.event != PM_EVENT_ON) { if (pdev->dev.power.power_state.event != PM_EVENT_ON) {
......
...@@ -18,13 +18,13 @@ ...@@ -18,13 +18,13 @@
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/completion.h> #include <linux/completion.h>
#include <linux/pm.h> #include <linux/pm.h>
#include <linux/mutex.h>
#ifdef CONFIG_BLK_DEV_IDEACPI #ifdef CONFIG_BLK_DEV_IDEACPI
#include <acpi/acpi.h> #include <acpi/acpi.h>
#endif #endif
#include <asm/byteorder.h> #include <asm/byteorder.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/mutex.h>
/* for request_sense */ /* for request_sense */
#include <linux/cdrom.h> #include <linux/cdrom.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment