aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-pnp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-pnp.c')
-rw-r--r--drivers/ide/ide-pnp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/ide/ide-pnp.c b/drivers/ide/ide-pnp.c
index 4bda5cf2be37..b163b2e52212 100644
--- a/drivers/ide/ide-pnp.c
+++ b/drivers/ide/ide-pnp.c
@@ -49,7 +49,7 @@ static int idepnp_probe(struct pnp_dev * dev, const struct pnp_device_id *dev_id
49 printk(KERN_INFO "ide%d: generic PnP IDE interface\n", index); 49 printk(KERN_INFO "ide%d: generic PnP IDE interface\n", index);
50 pnp_set_drvdata(dev,hwif); 50 pnp_set_drvdata(dev,hwif);
51 51
52 ide_device_add(idx); 52 ide_device_add(idx, NULL);
53 53
54 return 0; 54 return 0;
55 } 55 }
@@ -60,9 +60,10 @@ static int idepnp_probe(struct pnp_dev * dev, const struct pnp_device_id *dev_id
60static void idepnp_remove(struct pnp_dev * dev) 60static void idepnp_remove(struct pnp_dev * dev)
61{ 61{
62 ide_hwif_t *hwif = pnp_get_drvdata(dev); 62 ide_hwif_t *hwif = pnp_get_drvdata(dev);
63 if (hwif) { 63
64 ide_unregister(hwif->index); 64 if (hwif)
65 } else 65 ide_unregister(hwif->index, 0, 0);
66 else
66 printk(KERN_ERR "idepnp: Unable to remove device, please report.\n"); 67 printk(KERN_ERR "idepnp: Unable to remove device, please report.\n");
67} 68}
68 69