linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] IDE: fix Power Management
@ 2003-09-03 16:11 Benjamin Herrenschmidt
  2003-09-04 12:56 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2003-09-03 16:11 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz
  Cc: Patrick Mochel, Andrew Morton, linux-kernel mailing list

This is the "final" one hopefully, Bart, check out it's correct,
Andrew that I did no typo this time ;)

Spacing is a bit fucked up in setup_driver_defaults due to the
field name beeing too long (gah !) but that isn't too bad...

Ben.

diff -urN for-linus-ppc/drivers/ide/ide.c linuxppc-2.5-benh/drivers/ide/ide.c
--- for-linus-ppc/drivers/ide/ide.c	2003-09-03 18:07:14.000000000 +0200
+++ linuxppc-2.5-benh/drivers/ide/ide.c	2003-09-03 18:09:01.000000000 +0200
@@ -2406,6 +2406,12 @@
 	return ide_abort(drive, msg);
 }
 
+static int default_start_power_step(ide_drive_t *drive, struct request *rq)
+{
+	rq->pm->pm_step = ide_pm_state_completed;
+	return ide_stopped;
+}
+
 static void setup_driver_defaults (ide_driver_t *d)
 {
 	if (d->cleanup == NULL)		d->cleanup = default_cleanup;
@@ -2420,6 +2426,7 @@
 	if (d->capacity == NULL)	d->capacity = default_capacity;
 	if (d->special == NULL)		d->special = default_special;
 	if (d->attach == NULL)		d->attach = default_attach;
+	if (d->start_power_step == NULL)d->start_power_step = default_start_power_step;
 }
 
 int ide_register_subdriver (ide_drive_t *drive, ide_driver_t *driver, int version)



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] IDE: fix Power Management
  2003-09-03 16:11 [PATCH] IDE: fix Power Management Benjamin Herrenschmidt
@ 2003-09-04 12:56 ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2003-09-04 12:56 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz
  Cc: Patrick Mochel, Andrew Morton, linux-kernel mailing list

On Wed, 2003-09-03 at 18:11, Benjamin Herrenschmidt wrote:
> This is the "final" one hopefully, Bart, check out it's correct,
> Andrew that I did no typo this time ;)
> 
> Spacing is a bit fucked up in setup_driver_defaults due to the
> field name beeing too long (gah !) but that isn't too bad...

And it's even better with the proper return type... go figure
why I didn't see the gcc warning yesterday...

===== drivers/ide/ide.c 1.94 vs edited =====
--- 1.94/drivers/ide/ide.c	Tue Sep  2 16:18:29 2003
+++ edited/drivers/ide/ide.c	Thu Sep  4 14:54:13 2003
@@ -2406,6 +2406,12 @@
 	return ide_abort(drive, msg);
 }
 
+static ide_startstop_t default_start_power_step(ide_drive_t *drive, struct request *rq)
+{
+	rq->pm->pm_step = ide_pm_state_completed;
+	return ide_stopped;
+}
+
 static void setup_driver_defaults (ide_driver_t *d)
 {
 	if (d->cleanup == NULL)		d->cleanup = default_cleanup;
@@ -2420,6 +2426,7 @@
 	if (d->capacity == NULL)	d->capacity = default_capacity;
 	if (d->special == NULL)		d->special = default_special;
 	if (d->attach == NULL)		d->attach = default_attach;
+	if (d->start_power_step == NULL)d->start_power_step = default_start_power_step;
 }
 
 int ide_register_subdriver (ide_drive_t *drive, ide_driver_t *driver, int version)



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-09-04 12:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-03 16:11 [PATCH] IDE: fix Power Management Benjamin Herrenschmidt
2003-09-04 12:56 ` Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).