aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-pnp.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-02-02 13:56:39 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-02-02 13:56:39 -0500
commitf82c2b171905b6d5af92395d8159546351ab602f (patch)
tree89790c732a73c3210b5f8578d3a94a2717ab7b3b /drivers/ide/ide-pnp.c
parentead741df385607ab74876afdb05fd8ac27da9906 (diff)
ide: add 'init_default' and 'restore' arguments to ide_unregister()
* Add 'init_default' (flag for calling init_hwif_default()) and 'restore' (flag for calling ide_hwif_restore()) arguments to ide_unregister(). * Update ide_unregister() users to set 'init_default' and 'restore' flags. * No need to set 'init_default' flag in ide_register_hw() if the setup done by init_hwif_default() is going to be overridden by ide_init_port_hw(). * No need to set 'init_default' and 'restore' flags in cleanup_module(). There should be no functionality changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-pnp.c')
-rw-r--r--drivers/ide/ide-pnp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/ide/ide-pnp.c b/drivers/ide/ide-pnp.c
index 61c33ef64bda..a766bdbbad38 100644
--- a/drivers/ide/ide-pnp.c
+++ b/drivers/ide/ide-pnp.c
@@ -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, 1, 1);
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