On Sun, Jan 06, 2013 at 10:48:26AM +0800, Aaron Lu wrote:
> +bool zpodd_zpready(struct ata_device *dev)
> +{
> +     struct zpodd *zpodd = dev->zpodd;
> +     return zpodd->zp_ready;
> +}
> +
> +void zpodd_pre_poweroff(struct ata_device *dev)
> +{
> +     struct zpodd *zpodd = dev->zpodd;
> +
> +     zpodd->powered_off = true;
> +     device_set_run_wake(&dev->sdev->sdev_gendev, true);
> +     acpi_pm_device_run_wake(&dev->sdev->sdev_gendev, true);
> +}
> +
> +void zpodd_pre_poweron(struct ata_device *dev)
> +{
> +     struct zpodd *zpodd = dev->zpodd;
> +
> +     if (zpodd->powered_off) {
> +             acpi_pm_device_run_wake(&dev->sdev->sdev_gendev, false);
> +             device_set_run_wake(&dev->sdev->sdev_gendev, false);
> +     }
> +}
> +
> +void zpodd_post_resume(struct ata_device *dev)
> +{
> +     struct zpodd *zpodd = dev->zpodd;
> +
> +     if (!zpodd->powered_off)
> +             return;
> +
> +     zpodd->powered_off = false;
> +
> +     if (zpodd->from_notify) {
> +             zpodd->from_notify = false;
> +             if (zpodd->drawer)
> +                     eject_tray(dev);
> +     }
> +
> +     zpodd->last_ready = 0;
> +     zpodd->zp_ready = false;
> +}

I would really appreciate some comments at least on functions visible
outside zpodd.c.  Please add proper function comments explaining what
they're doing to achieve what.

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to