On Tue, Sep 04, 2012 at 05:57:35PM +0200, Oliver Neukum wrote: > > diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c > > index 902b5a4..64ba43d 100644 > > --- a/drivers/ata/libata-acpi.c > > +++ b/drivers/ata/libata-acpi.c > > @@ -985,8 +985,10 @@ static void ata_acpi_wake_dev(acpi_handle handle, u32 event, void *context) > > struct ata_device *ata_dev = context; > > > > if (event == ACPI_NOTIFY_DEVICE_WAKE && ata_dev && > > - pm_runtime_suspended(&ata_dev->sdev->sdev_gendev)) > > - scsi_autopm_get_device(ata_dev->sdev); > > + pm_runtime_suspended(&ata_dev->sdev->sdev_gendev)) { > > + ata_dev->sdev->wakeup_by_user = 1; > > That flag is badly named. Something like "insert_event_during_suspend" > would be better. The reason I added the flag is to let sr knows that when the device gets resumed, please eject its tray since user just pressed the eject button when it is in powered off state. If wakeup_by_user is badly named, what about need_eject? I don't think insert_event_during_suspend reflects what happened here. -Aaron -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html