Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2710771ybt; Mon, 22 Jun 2020 05:17:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2eHQSjDHTZScM34fBluU4VEZRze/+PVBA5KRVr7zsU2AEG73T8lP2V8n2M8uEL8QnAjmp X-Received: by 2002:a50:ee8f:: with SMTP id f15mr16832787edr.168.1592828240627; Mon, 22 Jun 2020 05:17:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592828240; cv=none; d=google.com; s=arc-20160816; b=lRd5gfn423cJSX5JQOagtEDqY+F2HZCWSRtjq0yp757ncf+krTzgl5uKnx3rDhFOMC gKL746u4J2XFOeq5MNZJktCMtLzqDFJvmNGQcJAdkGqBVlzQva0oKavfxa35GTDci9yB +0NR1YqRlEW3tzrjnWcXqqy41bHEayPP9x8ivJb5cLcmaccXYD0yx8/z31n1pfLyV5BS GPw70HdQhl5FetnhgFov6ajEixg7g+h+6w+CGnrDGwprcDcaQM6Jou1Vpd4A9f/OYJe7 MTYDqQGGHTFBjHZD1F+nhAUg8TZ1JroflMdRfBePKWBGLM1XNJOWN+DCA/Pn5v5Cs6zs lreA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=I9HlSKQMhzG7oJydL+6eh0up9y5VwqFmL94sToYa/uE=; b=NMeVd9L+pDlsaqZnu0vXOB5HUVjd6LMFULZE6iugULKoXistoQJeG/hhd1Nn6zkdqg pGj0B0DAnZlUSJBATcI0eNiAOto19X3BHuvKZ292HOEBLCXWGdmhXAtmgYIMke0T3St9 LrT0yPYdNIEG2sR7Tet2dcW+tQZaw0fpJibPo7xU4VRT7KATaV7s1Cj4SfaQvXtrwqfP 4T2IYFgFXWem9HJSbHLFNcPvlmPwskVICw8OMlZBTOcFvAPxDJhvr1mpGKvLQ2+pYIXx NindFo2RutGzJjS0dOn7tEyP8n0OhEJSf1vty7kijoUe7IeDZxYXojIWvV6yOgREZWar 5y3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lgX4gjHF; 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 g25si9189917edy.603.2020.06.22.05.16.56; Mon, 22 Jun 2020 05:17:20 -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=lgX4gjHF; 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 S1728145AbgFVMNA (ORCPT + 99 others); Mon, 22 Jun 2020 08:13:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726947AbgFVMM7 (ORCPT ); Mon, 22 Jun 2020 08:12:59 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC729C061794; Mon, 22 Jun 2020 05:12:59 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id q22so5211004pgk.2; Mon, 22 Jun 2020 05:12:59 -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:mime-version :content-transfer-encoding; bh=I9HlSKQMhzG7oJydL+6eh0up9y5VwqFmL94sToYa/uE=; b=lgX4gjHFucnFy5VkHP2WiY0D6XIEbcexKj1KxqJvBC+wiYLIl3kjnY5OiQ1lFBiGEL SZV3TvRi8AXTgDSbP1PcCEh22JfsRDXasJvLF7aUyb7UGHlKr6q4SKwLdt7gO2Ll0svi Bual2eB0y3TvXX0L8+Vg1km1WXhTjaeetYw4dJrSAxVa566HGLht8BDas3Ilc1JSmuuI gzEiuavSKzSdNavT5PNXwQ65afsFpTlWu2jiv8+hIA7cZiZyJvN7pJXOmJUixy8B14up y0yBURG+HoEUapcIxVxqS7s0AykmtYzDFVTMtMpkQuUleUQWWnyfZhPNvzcD/IzbyvId gHmg== 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:mime-version :content-transfer-encoding; bh=I9HlSKQMhzG7oJydL+6eh0up9y5VwqFmL94sToYa/uE=; b=LrHFKYfjXX61CHs5r9LpNUMCDZ3Nzf/nUXtAHa/mR/kaNi6BsgWPoRYzv+nFPD26/A fQaWH7276vDYSIr0rjnkkv2Lv0zVvFRsjTKKDkoGTjCtLdwarfaTgTkywdlrLLxz1poA 506XgY1k00ZOzpkav1M/v3POnx58PFA1MCkJHyjJoC8QKnpKU2M98l7A8RThLLA/9bg/ p+a9ETSIXAMLel8Wr65XxvwSp5tAuJfvg0OML4ZV4zD8MUK4ZF7reh1jCS5rTvI1elmB 2ZSbRfaFQcoeuSA0DMAkGnIZxa3MHh9+B9LRL8EJeTfqdEdXbycAs0AfMdVxfREvNKAC nD/g== X-Gm-Message-State: AOAM532dZzAS2Vxaq8ImtyVelWh6prJWWkORK5/9t4cwXpITjvWc1Yid MHt33mJC4f01OX2W5q82kAE= X-Received: by 2002:a62:ed02:: with SMTP id u2mr19752810pfh.283.1592827979227; Mon, 22 Jun 2020 05:12:59 -0700 (PDT) Received: from varodek.localdomain ([2401:4900:b8b:123e:d7ae:5602:b3d:9c0]) by smtp.gmail.com with ESMTPSA id z9sm6745565pgh.94.2020.06.22.05.12.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jun 2020 05:12:58 -0700 (PDT) From: Vaibhav Gupta To: Bjorn Helgaas , Bjorn Helgaas , bjorn@helgaas.com, Mauro Carvalho Chehab , Vaibhav Gupta Cc: Vaibhav Gupta , linux-kernel-mentees@lists.linuxfoundation.org, skhan@linuxfoundation.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1] [media] saa7164: use dev_pm_ops structure for power management Date: Mon, 22 Jun 2020 17:39:13 +0530 Message-Id: <20200622120912.92392-1-vaibhavgupta40@gmail.com> X-Mailer: git-send-email 2.27.0 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 The .suspend() and .resume() callbacks are not defined for this driver. Still, their power managemgement stucture can be easily upgraded to gemeric, without affecting its normal behaviour. Signed-off-by: Vaibhav Gupta --- drivers/media/pci/saa7164/saa7164-core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/media/pci/saa7164/saa7164-core.c b/drivers/media/pci/saa7164/saa7164-core.c index 126d085be9a7..dba537c11797 100644 --- a/drivers/media/pci/saa7164/saa7164-core.c +++ b/drivers/media/pci/saa7164/saa7164-core.c @@ -1534,14 +1534,18 @@ static const struct pci_device_id saa7164_pci_tbl[] = { }; MODULE_DEVICE_TABLE(pci, saa7164_pci_tbl); +#define saa7164_suspend NULL +#define saa7164_resume NULL + +static SIMPLE_DEV_PM_OPS(saa7164_pm_ops, saa7164_suspend, saa7164_resume); + static struct pci_driver saa7164_pci_driver = { .name = "saa7164", .id_table = saa7164_pci_tbl, .probe = saa7164_initdev, .remove = saa7164_finidev, /* TODO */ - .suspend = NULL, - .resume = NULL, + .driver.pm = &saa7164_pm_ops, }; static int __init saa7164_init(void) -- 2.27.0