lkml.org 
[lkml]   [2002]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [patch] IDE driver model update


    On Mon, 7 Oct 2002, Patrick Mochel wrote:

    > --- a/drivers/ide/ide-probe.c Mon Oct 7 12:19:11 2002
    > +++ b/drivers/ide/ide-probe.c Mon Oct 7 12:19:11 2002
    > @@ -952,6 +952,15 @@
    >
    > EXPORT_SYMBOL(init_irq);
    >
    > +static void ide_device_release(struct device * dev)
    > +{
    > + ide_drive_t * drive = dev->driver_data;
    > + ide_driver_t * driver = drive->driver;
    > +
    > + if (driver && driver->cleanup)
    > + driver->cleanup(drive);
    > +}
    > +
    > /*
    > * init_gendisk() (as opposed to ide_geninit) is called for each major device,
    > * after probing for drives, to allocate partition tables and other data
    > @@ -986,6 +995,8 @@
    > "%s","IDE Drive");
    > disk->disk_dev.parent = &hwif->gendev;
    > disk->disk_dev.bus = &ide_bus_type;
    > + disk->disk_dev.driver_data = &hwif->drives[unit];
    > + disk->disk_dev.release = ide_device_release;

    That is Wrong(tm). Logics around ->cleanup() doesn't belong to driverfs.
    As far as IDE code is concerned, any outside calls of ->cleanup() are
    illegal. What are you trying to achieve with that?

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:29    [W:0.029 / U:90.144 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site