From patchwork Tue Oct 25 20:38:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 13019880 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5405FA373E for ; Tue, 25 Oct 2022 20:39:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232883AbiJYUjR (ORCPT ); Tue, 25 Oct 2022 16:39:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232888AbiJYUjP (ORCPT ); Tue, 25 Oct 2022 16:39:15 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03CEAD03AA; Tue, 25 Oct 2022 13:39:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9635561939; Tue, 25 Oct 2022 20:39:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA65BC433C1; Tue, 25 Oct 2022 20:39:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666730354; bh=eKHajaFPUWFcahp2dCsnvEJvSfJoqHc/LouZANgGWxA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ue1ItoRnu0SGGKifXtX8/BOQCE5RlSxjOh72lh1UAlf7++SLT1PIXarNnwTHdSLI4 CtzCDgMAD0/cK7zpVttgolq67WApv/pz94yGPGjEbOpMnxn+UrSQ7ZfKmGnBZtCxV8 Cc/NncDWwMwztb4RfVBL0wka5Mklf6flf9LpvCRJ5Ge3InJJ7+wifnLdqcB55Lxb5f 6KWI8y4SD+5Vek7NNCXL6OwnGB4W/wbT6DI3K92qdPuJZ7+AqTSW6ZftpiMjTSqqpU dS6Y79nwfSt2Z0BngaTp3zKD7zAybnZrWgAET0/W12O/9E/qopzxJ9eDxVsftE9g0c mKHoFjOoDg5Fw== From: Bjorn Helgaas To: David Airlie Cc: =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , "Rafael J . Wysocki" , Vaibhav Gupta , dri-devel@lists.freedesktop.org, linux-pci@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Helgaas Subject: [PATCH v2 8/8] agp/via: Update to DEFINE_SIMPLE_DEV_PM_OPS() Date: Tue, 25 Oct 2022 15:38:52 -0500 Message-Id: <20221025203852.681822-9-helgaas@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221025203852.681822-1-helgaas@kernel.org> References: <20221025203852.681822-1-helgaas@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Bjorn Helgaas As of 1a3c7bb08826 ("PM: core: Add new *_PM_OPS macros, deprecate old ones"), SIMPLE_DEV_PM_OPS() is deprecated in favor of DEFINE_SIMPLE_DEV_PM_OPS(), which has the advantage that the PM callbacks don't need to be wrapped with #ifdef CONFIG_PM or tagged with __maybe_unused. Convert to DEFINE_SIMPLE_DEV_PM_OPS(). No functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/char/agp/via-agp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/char/agp/via-agp.c b/drivers/char/agp/via-agp.c index b2f484f527fb..bc5140af2dcb 100644 --- a/drivers/char/agp/via-agp.c +++ b/drivers/char/agp/via-agp.c @@ -489,9 +489,7 @@ static void agp_via_remove(struct pci_dev *pdev) agp_put_bridge(bridge); } -#define agp_via_suspend NULL - -static int __maybe_unused agp_via_resume(struct device *dev) +static int agp_via_resume(struct device *dev) { struct agp_bridge_data *bridge = dev_get_drvdata(dev); @@ -551,7 +549,7 @@ static const struct pci_device_id agp_via_pci_table[] = { MODULE_DEVICE_TABLE(pci, agp_via_pci_table); -static SIMPLE_DEV_PM_OPS(agp_via_pm_ops, agp_via_suspend, agp_via_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(agp_via_pm_ops, NULL, agp_via_resume); static struct pci_driver agp_via_pci_driver = { .name = "agpgart-via",