V4L/DVB (3643): Fix default values for tvp5150 controls
[powerpc.git] / drivers / ide / ide.c
index ec5a4cb..3fdab56 100644 (file)
@@ -242,7 +242,6 @@ static void init_hwif_data(ide_hwif_t *hwif, unsigned int index)
                drive->name[2]                  = 'a' + (index * MAX_DRIVES) + unit;
                drive->max_failures             = IDE_DEFAULT_MAX_FAILURES;
                drive->using_dma                = 0;
-               drive->is_flash                 = 0;
                drive->vdma                     = 0;
                INIT_LIST_HEAD(&drive->list);
                init_completion(&drive->gendev_rel_comp);
@@ -1949,10 +1948,41 @@ static int ide_uevent(struct device *dev, char **envp, int num_envp,
        return 0;
 }
 
+static int generic_ide_probe(struct device *dev)
+{
+       ide_drive_t *drive = to_ide_device(dev);
+       ide_driver_t *drv = to_ide_driver(dev->driver);
+
+       return drv->probe ? drv->probe(drive) : -ENODEV;
+}
+
+static int generic_ide_remove(struct device *dev)
+{
+       ide_drive_t *drive = to_ide_device(dev);
+       ide_driver_t *drv = to_ide_driver(dev->driver);
+
+       if (drv->remove)
+               drv->remove(drive);
+
+       return 0;
+}
+
+static void generic_ide_shutdown(struct device *dev)
+{
+       ide_drive_t *drive = to_ide_device(dev);
+       ide_driver_t *drv = to_ide_driver(dev->driver);
+
+       if (dev->driver && drv->shutdown)
+               drv->shutdown(drive);
+}
+
 struct bus_type ide_bus_type = {
        .name           = "ide",
        .match          = ide_bus_match,
        .uevent         = ide_uevent,
+       .probe          = generic_ide_probe,
+       .remove         = generic_ide_remove,
+       .shutdown       = generic_ide_shutdown,
        .dev_attrs      = ide_dev_attrs,
        .suspend        = generic_ide_suspend,
        .resume         = generic_ide_resume,
@@ -2028,7 +2058,7 @@ static void __init parse_options (char *line)
        }
 }
 
-int init_module (void)
+int __init init_module (void)
 {
        parse_options(options);
        return ide_init();