Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752081AbbEGAav (ORCPT ); Wed, 6 May 2015 20:30:51 -0400 Received: from mga11.intel.com ([192.55.52.93]:49374 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751494AbbEGAas (ORCPT ); Wed, 6 May 2015 20:30:48 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,381,1427785200"; d="scan'208";a="721930151" Message-ID: <554AB233.4060608@linux.intel.com> Date: Thu, 07 May 2015 08:30:43 +0800 From: "Lu, Baolu" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Alan Stern CC: Greg Kroah-Hartman , Mathias Nyman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/3] usb: xhci: implement device_suspend/device_resume entries References: In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1609 Lines: 57 On 05/06/2015 10:30 PM, Alan Stern wrote: > On Wed, 6 May 2015, Lu Baolu wrote: > >> This patch implements device_suspend/device_resume entries for xHC driver. >> device_suspend will be called when a USB device is about to suspend. It >> will issue a stop endpoint command for each endpoint in this device. The >> Suspend(SP) bit in the command TRB will set which will give xHC a hint >> about the suspend. device_resume will be called when a USB device is just >> resumed. It will ring doorbells of all endpoint unconditionally. XHC may >> use these suspend/resume hints to optimize its operation. >> >> Signed-off-by: Lu Baolu > ... > >> #else /* CONFIG_PM */ >> >> int xhci_set_usb2_hardware_lpm(struct usb_hcd *hcd, >> @@ -4704,6 +4728,16 @@ int xhci_disable_usb3_lpm_timeout(struct usb_hcd *hcd, >> { >> return 0; >> } >> + >> +void xhci_device_suspend(struct usb_hcd *hcd, >> + struct usb_device *udev, pm_message_t msg) >> +{ >> +} >> + >> +void xhci_device_resume(struct usb_hcd *hcd, >> + struct usb_device *udev, pm_message_t msg) >> +{ >> +} > You don't need to have empty functions. Just do this: > > #define xhci_device_suspend NULL > #define xhci_device_resume NULL > > in the appropriate place, when CONFIG_PM is not enabled. Yes, I agree. I will change it. > > Alan Stern Thank you, Baolu > > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/