From patchwork Tue Jul 26 09:59:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12929117 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 42425C43334 for ; Tue, 26 Jul 2022 09:58:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Pe1OZlmAoTmzbhGADTGMxXovo3euWo62mBwJce1CERM=; b=0ozVLOy/dodxOh YogT2Pv2xwajsW9XZIXECCXu+s0vXv1bjR4eVwuywMCdJ7lLGtDKJiaayJacIDOa3Kzsla4mVWIdM ctIKju4R2HJlb/uBJIlJQpW0+1w9StmdiPQBpR0d7BzCVc4DR+2+JJwMrFAZjMzEuzVEsVSrK4zEU VPrDkZbce3EsmCzzHyADSUoXqz9jHIo6+DXaLjsldiUuIdlJ0L8UbqMCPL9qaxTgyo0aj0jZXxcYN 01G+yTeydK3cDzq44tFhCvf1XxDZ0dRrvQI9Ned91ZefTiGVeK2SMWkSez2I6TuPyZzBUTqy3WKgJ zwrL3kMZRJoBvwwzuGAw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGHK2-00C17b-Dr; Tue, 26 Jul 2022 09:57:50 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGHJj-00C0vJ-N0 for linux-arm-kernel@lists.infradead.org; Tue, 26 Jul 2022 09:57:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1658829451; x=1690365451; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JG/ERXhf6xiKqQVd9uEykEdvGxS/Vz7RRikpu9AWpDE=; b=e8Q2al9e7nTbmFaFMXfgcnyMYdJkS63GYGhkkX+u4Ey6x8xh60Ap9TIR 8QKpmzROyXaPSKtoYVPIh2Qj290j9OZO3IX3T0Lx3ZGFACtsxv8L5aNaN 9K0UP8YyfPE5Q6qOwFrFngEasLx1T6tcSCpWQrNDv5Z7JL1oPnrbqAgW5 wZg1NldTiY5G9ayXW41wGlV1FZ3pkel5YWjKObQkzPKOt2sFcLbLSt6dP tDVUFWO2ulc5qRbLRAeDnNR84kfADJ20BmKfBmkz2/YFZXG/kSWQHkpO2 mO1DWMuYpHAEI22XJaQW3E8eDtMBRMMB5UBiZ7t2dZqSSvRpzrq/7wJEr g==; X-IronPort-AV: E=Sophos;i="5.93,193,1654585200"; d="scan'208";a="166409646" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 26 Jul 2022 02:57:30 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Tue, 26 Jul 2022 02:57:30 -0700 Received: from localhost.localdomain (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2375.28 via Frontend Transport; Tue, 26 Jul 2022 02:57:28 -0700 From: Claudiu Beznea To: , , , , CC: , , , Claudiu Beznea Subject: [PATCH 2/2] usb: gadget: udc: atmel: remove #ifdef CONFIG_PM_SLEEP Date: Tue, 26 Jul 2022 12:59:48 +0300 Message-ID: <20220726095948.1809038-2-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220726095948.1809038-1-claudiu.beznea@microchip.com> References: <20220726095948.1809038-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220726_025731_853252_ED4A0928 X-CRM114-Status: GOOD ( 10.91 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Remove #ifdef CONFIG_PM_SLEEP and use DEFINE_SIMPLE_DEV_PM_OPS() along with pm_sleep_ptr(). Signed-off-by: Claudiu Beznea --- drivers/usb/gadget/udc/atmel_usba_udc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c index ae2bfbac603e..6c088f6e9afa 100644 --- a/drivers/usb/gadget/udc/atmel_usba_udc.c +++ b/drivers/usb/gadget/udc/atmel_usba_udc.c @@ -2384,7 +2384,6 @@ static int usba_udc_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM_SLEEP static int usba_udc_suspend(struct device *dev) { struct usba_udc *udc = dev_get_drvdata(dev); @@ -2442,15 +2441,14 @@ static int usba_udc_resume(struct device *dev) return 0; } -#endif -static SIMPLE_DEV_PM_OPS(usba_udc_pm_ops, usba_udc_suspend, usba_udc_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(usba_udc_pm_ops, usba_udc_suspend, usba_udc_resume); static struct platform_driver udc_driver = { .remove = usba_udc_remove, .driver = { .name = "atmel_usba_udc", - .pm = &usba_udc_pm_ops, + .pm = pm_sleep_ptr(&usba_udc_pm_ops), .of_match_table = atmel_udc_dt_ids, }, };