misc: tegra: Disable short delay if wake gpio not defined.
glei [Wed, 9 Oct 2013 06:03:07 +0000 (14:03 +0800)]
Disable short_autosuspend_delay for Modem device, when wake gpio
is not used.

Bug 1362837

Change-Id: Iadcd28ba432846aeed636d453208d3f954aaf065
Signed-off-by: glei <glei@nvidia.com>
Reviewed-on: http://git-master/r/283833
(cherry picked from commit dc8d4213de17f27a8440dc87ce8bec0623048147)
Reviewed-on: http://git-master/r/302954
Reviewed-by: Neil Patel <neilp@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: Neil Patel <neilp@nvidia.com>
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
Reviewed-by: Steve Lin <stlin@nvidia.com>

drivers/misc/tegra-baseband/tegra_usb_modem_power.c

index 175a70d..14baff4 100644 (file)
@@ -395,6 +395,7 @@ static int mdm_pm_notifier(struct notifier_block *notifier,
                modem->system_suspend = 1;
 #ifdef CONFIG_PM
                if (modem->capability & TEGRA_MODEM_AUTOSUSPEND &&
+                   modem->wake_irq &&
                    modem->udev &&
                    modem->udev->state != USB_STATE_NOTATTACHED) {
                        pm_runtime_set_autosuspend_delay(&modem->udev->dev,