Re: Force IDE cache flush on shutdown

From: Bartlomiej Zolnierkiewicz
Date: Thu May 06 2004 - 07:52:20 EST


On Thursday 06 of May 2004 09:49, Christoph Hellwig wrote:
> On Thu, May 06, 2004 at 09:04:49AM +0200, Arjan van de Ven wrote:
> > +static int ide_disk_notify_reboot (struct notifier_block *this, unsigned
> > long event, void *x) +{
> > + ide_hwif_t *hwif;
> > + ide_drive_t *drive;
> > + int i, unit;
> > +
> > + switch (event) {
> > + case SYS_HALT:
> > + case SYS_POWER_OFF:
> > + break;
> > + default:
> > + return NOTIFY_DONE;
> > + }
>
> Please don't use reboot notifiers in new driver code. The driver
> model has a ->shutdown method for that.

There is one problem with using ->shutdown:
handling of SYS_RESTART isn't the same as of SYS_HALT and SYS_POWER_OFF.

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