From patchwork Thu Dec 13 03:19:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10727669 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D654713AF for ; Thu, 13 Dec 2018 03:20:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B7BB12B96E for ; Thu, 13 Dec 2018 03:20:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A532F2B974; Thu, 13 Dec 2018 03:20:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 867112B96E for ; Thu, 13 Dec 2018 03:20:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726564AbeLMDUF (ORCPT ); Wed, 12 Dec 2018 22:20:05 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:52217 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726470AbeLMDUF (ORCPT ); Wed, 12 Dec 2018 22:20:05 -0500 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id D61B664683C03; Thu, 13 Dec 2018 11:20:00 +0800 (CST) Received: from localhost (10.177.31.96) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.408.0; Thu, 13 Dec 2018 11:19:52 +0800 From: YueHaibing To: , , , , CC: , , YueHaibing Subject: [PATCH -next] usb: renesas_usbhs: Fix unused function warning when CONFIG_PM not set Date: Thu, 13 Dec 2018 11:19:24 +0800 Message-ID: <20181213031924.12216-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.177.31.96] X-CFilter-Loop: Reflected Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP with CONFIG_PM not set, gcc warning this: drivers/usb/renesas_usbhs/common.c:844:12: warning: 'usbhsc_suspend' defined but not used [-Wunused-function] drivers/usb/renesas_usbhs/common.c:860:12: warning: 'usbhsc_resume' defined but not used [-Wunused-function] fix this by adding #ifdef around it. Signed-off-by: YueHaibing --- drivers/usb/renesas_usbhs/common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c index 02c1d2b..9390c76 100644 --- a/drivers/usb/renesas_usbhs/common.c +++ b/drivers/usb/renesas_usbhs/common.c @@ -841,6 +841,7 @@ static int usbhs_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_PM static int usbhsc_suspend(struct device *dev) { struct usbhs_priv *priv = dev_get_drvdata(dev); @@ -873,6 +874,7 @@ static int usbhsc_resume(struct device *dev) return 0; } +#endif static SIMPLE_DEV_PM_OPS(usbhsc_pm_ops, usbhsc_suspend, usbhsc_resume);