Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp687852pxa; Wed, 19 Aug 2020 12:03:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwic3VKQTSMC8VlSWcL5KGWNqKW1jzbWpLu1t6QrHLUURw0RpE72SC49tw5Ng4TZ9DuIyzj X-Received: by 2002:a17:906:2e86:: with SMTP id o6mr27709536eji.380.1597863829575; Wed, 19 Aug 2020 12:03:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597863829; cv=none; d=google.com; s=arc-20160816; b=JjZXAaQEB7LxNV77WOT1yOUsaxhnfbUvwofKqpiNtLDBojWT9/TGHCPv3DXMRM1Qjk y5UoM8g52DMeZNqBpJGdGYbp89Iho6ksTFy1jUdPm2nNmEn9mSMrsF8k0KkVNvxXcWi9 2dprly/wLBhMHVVSbVIj5XQuWRSbKuZS8jzPdNdzPXbsJmoJM8n1aSH9NYlzt2L0u+qU NgyqsuJkP4tmPLM9RGGLTVYeZlxFFjaL+MEudtjUOwgGADUTZc4TvLwaxccW1jI79a7H f/8Ouy55bkHrt2uUr70bxCtVLoCT7fIX6II815/xZ1m1uQY7qEHwtAMR2Vy8C0IVoCIB SL2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7pp7ILrXVpYWERUNp+y3FKEvGmfdJxafp13Cd61iIdo=; b=qxEzyCHjToHQP9W/O5pBtSZe7FzF0qlR1TOVYkU4atAQwtCRGED45nL7licZPCpDa9 WtalodA52E2tFDQ2IkQPOz1CjPykm/OHuhdmzboyUrNSCDFrTB/7r2EygdVmCaRljdtM BAR0qIMLlwu+a5FN7MHHIuVYm6zZ4CdV+kYv25PtGMR7wOYlapHpKxVC7Y5oH/MYeXAu Bt7203ysmTBDmc58kojOBzbbqqAl1UqRVhIlxKH7NOE2vgYv2rJXCyivfUe7y41w2Y6o IuSxXDEf6YP9Dp2xMiPqxRK8pw0+WjGmZwzoYMklhGgk8orAMW6lSuwdlPPLq1dTsGuV BkpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Mn+ymFH5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s3si16284066edy.554.2020.08.19.12.03.25; Wed, 19 Aug 2020 12:03:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Mn+ymFH5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726989AbgHSS74 (ORCPT + 99 others); Wed, 19 Aug 2020 14:59:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726685AbgHSS7u (ORCPT ); Wed, 19 Aug 2020 14:59:50 -0400 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53000C061757; Wed, 19 Aug 2020 11:59:50 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id u10so11269795plr.7; Wed, 19 Aug 2020 11:59:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7pp7ILrXVpYWERUNp+y3FKEvGmfdJxafp13Cd61iIdo=; b=Mn+ymFH5Tc2xZr4mSSRBUl7CNfTA0DlesWU0Sq0Xu1T+OqneWcVq4ekASysyYI2ETT NOSB7C2Cedt19yXvJ2upXqZodaCRErUqHBJvXJ+y1AG0d1s3aeoXWgX4ydW1wonG1AQJ KyyYcwn0E1nHoVzOPWBujC3D3P2PPODBG13GhGBCib7jUZw+yShRX9TFZfqK5/8JvmIY Q9fAysRWcGK4QLyVjz9u8ryaERCmVOEyPJXSzbd+3ZARafIcqDvcV2dqniZXDul1xz43 LQjdek9dXEkDQpvBHd7Ur9Oo/o0EtG2HR0sFPQG850ujw/PavQIQaX7UXDdE6ivpyEku Cp4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7pp7ILrXVpYWERUNp+y3FKEvGmfdJxafp13Cd61iIdo=; b=rC7Y/zR9e+FGO+JyIgJqTYl6rEXWn+IKkxiUemRWJ8/72/E+AIa4l2syR07oi8fC8+ puiim5kxP519PKuKZM/RPlrezWBL7+9uFmRMg2RXczfeZvGj+aEIG74G5infPGHBVyQg HmbtjSD2tMjiNK6yMWsHuNbG/jnZuotzb33QnSULLEnw3wI0GcBdyYJsjLsoEL/+qgZv FR9lsSEGX52aPfPqYUG2P+nzJeG67yDw0mDjYfTzHJcQ2CA50GH7nGcDvnhJUWtztvOf oZIpodX5wwW+lNFKm6i3BLOJXJ8cnru194/eiyPFni1ZRpaISUU5XjVlu+GmwEM1r3KM KX9g== X-Gm-Message-State: AOAM531IcJL1s+Ka6SUMpBj47iGOQqalMO45jWZz1LDebg4c2XCclz+M N5BA8tQvhHCpKCUUZPvTzUM= X-Received: by 2002:a17:90a:498b:: with SMTP id d11mr5130955pjh.179.1597863589786; Wed, 19 Aug 2020 11:59:49 -0700 (PDT) Received: from varodek.iballbatonwifi.com ([103.105.152.86]) by smtp.gmail.com with ESMTPSA id o134sm29149305pfg.200.2020.08.19.11.59.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Aug 2020 11:59:49 -0700 (PDT) From: Vaibhav Gupta To: Bjorn Helgaas , Bjorn Helgaas , Bjorn Helgaas , Vaibhav Gupta , Bartlomiej Zolnierkiewicz , Sam Ravnborg , Paul Mackerras , Russell King , Andres Salomon , Antonino Daplas Cc: Vaibhav Gupta , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-geode@lists.infradead.org, linux-kernel@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, Shuah Khan Subject: [PATCH v3 08/12] fbdev: cyber2000fb: use generic power management Date: Thu, 20 Aug 2020 00:26:50 +0530 Message-Id: <20200819185654.151170-9-vaibhavgupta40@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200819185654.151170-1-vaibhavgupta40@gmail.com> References: <20200819185654.151170-1-vaibhavgupta40@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Switch to the new generic framework by updating function signatures and define a "struct dev_pm_ops" variable to bind PM callbacks. This way we can remove the legacy .suspend & .resume bindings from "lxfb_driver". Signed-off-by: Vaibhav Gupta --- drivers/video/fbdev/cyber2000fb.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/video/fbdev/cyber2000fb.c b/drivers/video/fbdev/cyber2000fb.c index 42d37bed518a..d45355b9a58c 100644 --- a/drivers/video/fbdev/cyber2000fb.c +++ b/drivers/video/fbdev/cyber2000fb.c @@ -1810,7 +1810,7 @@ static void cyberpro_pci_remove(struct pci_dev *dev) } } -static int cyberpro_pci_suspend(struct pci_dev *dev, pm_message_t state) +static int __maybe_unused cyberpro_pci_suspend(struct device *dev) { return 0; } @@ -1818,9 +1818,9 @@ static int cyberpro_pci_suspend(struct pci_dev *dev, pm_message_t state) /* * Re-initialise the CyberPro hardware */ -static int cyberpro_pci_resume(struct pci_dev *dev) +static int __maybe_unused cyberpro_pci_resume(struct device *dev) { - struct cfb_info *cfb = pci_get_drvdata(dev); + struct cfb_info *cfb = dev_get_drvdata(dev); if (cfb) { cyberpro_pci_enable_mmio(cfb); @@ -1846,12 +1846,15 @@ static struct pci_device_id cyberpro_pci_table[] = { MODULE_DEVICE_TABLE(pci, cyberpro_pci_table); +static SIMPLE_DEV_PM_OPS(cyberpro_pci_pm_ops, + cyberpro_pci_suspend, + cyberpro_pci_resume); + static struct pci_driver cyberpro_driver = { .name = "CyberPro", .probe = cyberpro_pci_probe, .remove = cyberpro_pci_remove, - .suspend = cyberpro_pci_suspend, - .resume = cyberpro_pci_resume, + .driver.pm = &cyberpro_pci_pm_ops, .id_table = cyberpro_pci_table }; -- 2.28.0