Skip to content

Commit

Permalink
usb: dwc2: Fix build warning when CONFIG_PM_SLEEP=n
Browse files Browse the repository at this point in the history
Building with bcm2835_defconfig, which has CONFIG_PM_SLEEP=n causes the
following build warning:

drivers/usb/dwc2/platform.c:227:12: warning: 'dwc2_suspend' defined but not used [-Wunused-function]
drivers/usb/dwc2/platform.c:237:12: warning: 'dwc2_resume' defined but not used [-Wunused-function]

Annotate these functions with '__maybe_unused' to prevent the warnings.

Reported-by: Olof's autobuilder <build@lixom.net>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Fabio Estevam authored and Felipe Balbi committed Nov 25, 2014
1 parent 4db9917 commit da9f328
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/dwc2/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ static int dwc2_driver_probe(struct platform_device *dev)
return retval;
}

static int dwc2_suspend(struct device *dev)
static int __maybe_unused dwc2_suspend(struct device *dev)
{
struct dwc2_hsotg *dwc2 = dev_get_drvdata(dev);
int ret = 0;
Expand All @@ -236,7 +236,7 @@ static int dwc2_suspend(struct device *dev)
return ret;
}

static int dwc2_resume(struct device *dev)
static int __maybe_unused dwc2_resume(struct device *dev)
{
struct dwc2_hsotg *dwc2 = dev_get_drvdata(dev);
int ret = 0;
Expand Down

0 comments on commit da9f328

Please sign in to comment.