lkml.org 
[lkml]   [2004]   [May]   [9]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSun, 9 May 2004 04:00:17 +0200
FromPavel Machek <>
SubjectRe: Force IDE cache flush on shutdown
Hi!

> > +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.

Also you want to run this on machine entering S3 or suspend-to-disk,
too...

								Pavel
-- 
When do you have heart between your knees?
-
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:03    [from the cache]
©2003-2008