Skip to contentSkip to conversation

make idedisk_suspend()/idedisk_resume() conditional on CONFIG_SOFTWARE_SUSPEND

PATCH William Lee Irwin III 2 participants 2 messages Oct 11, 2002

lore
Share & tools
lore
#0 lore raw

ide-disk.c gets the following warning:

drivers/ide/ide-disk.c:1614: warning: idedisk_suspend' defined but not used drivers/ide/ide-disk.c:1651: warning: idedisk_resume' defined but not used

drivers/ide/ide-disk.c +2 -1
@@ -1610,6 +1610,7 @@
 #endif
 }
 
+#ifdef CONFIG_SOFTWARE_SUSPEND
 static int idedisk_suspend(struct device *dev, u32 state, u32 level)
 {
 	ide_drive_t *drive = dev->driver_data;
@@ -1659,7 +1660,7 @@
 	drive->blocked = 0;
 	return 0;
 }
-
+#endif /* CONFIG_SOFTWARE_SUSPEND */
 
 /* This is just a hook for the overall driver tree.
  */
#1 lore raw
Quoted 4 lines · William Lee Irwin III

ide-disk.c gets the following warning:

drivers/ide/ide-disk.c:1614: warning: idedisk_suspend' defined but not used drivers/ide/ide-disk.c:1651: warning: idedisk_resume' defined but not used

Hi Pavel,
shouldn't this kinda thing be handled by the driver model layer?
Ditto for the device walk and suspend in suspend.c. Also what do you think of adding hooks to driver model tree so that we can add additional handlers for things like this with the driver model doing the final suspend as specified in the driver.

Zwane

Signature · 1 line
function.linuxpower.ca