From: Vaibhav Gupta <vaibhavgupta40@gmail.com>
To: Ajay Gupta <ajayg@nvidia.com>
Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com>,
Bjorn Helgaas <helgaas@kernel.org>,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
Bjorn Helgaas <bhelgaas@google.com>
Subject: Re: [PATCH v1] i2c: nvidia-gpu: drop empty stub for runtime pm
Date: Sat, 7 Nov 2020 14:34:42 +0530 [thread overview]
Message-ID: <20201107090442.GA107675@gmail.com> (raw)
In-Reply-To: <20201107082151.58239-1-vaibhavgupta40@gmail.com>
On Sat, Nov 07, 2020 at 01:51:51PM +0530, Vaibhav Gupta wrote:
> After the commit c5eb1190074c ("PCI / PM: Allow runtime PM without callback
> functions") we no more need empty stubs for runtime-pm to work.
>
> The driver has no device specific task(s) for .suspend() . The stub was
> placed just for runtime-pm, which can be dropped now.
>
> Reported-by: Bjorn Helgaas <bhelgaas@google.com>
> Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com>
> ---
> drivers/i2c/busses/i2c-nvidia-gpu.c | 10 +---------
> 1 file changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-nvidia-gpu.c b/drivers/i2c/busses/i2c-nvidia-gpu.c
> index f9a69b109e5c..6b20601ffb13 100644
> --- a/drivers/i2c/busses/i2c-nvidia-gpu.c
> +++ b/drivers/i2c/busses/i2c-nvidia-gpu.c
> @@ -353,15 +353,7 @@ static void gpu_i2c_remove(struct pci_dev *pdev)
> pci_free_irq_vectors(pdev);
> }
>
> -/*
> - * We need gpu_i2c_suspend() even if it is stub, for runtime pm to work
> - * correctly. Without it, lspci shows runtime pm status as "D0" for the card.
> - * Documentation/power/pci.rst also insists for driver to provide this.
> - */
> -static __maybe_unused int gpu_i2c_suspend(struct device *dev)
> -{
> - return 0;
> -}
> +#define gpu_i2c_suspend NULL
>
> static __maybe_unused int gpu_i2c_resume(struct device *dev)
> {
> --
> 2.28.0
>
The patch is only compile-tested.
--Vaibhav
next prev parent reply other threads:[~2020-11-07 9:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-07 8:21 [PATCH v1] i2c: nvidia-gpu: drop empty stub for runtime pm Vaibhav Gupta
2020-11-07 9:04 ` Vaibhav Gupta [this message]
2020-11-10 12:33 ` Jarkko Nikula
2020-11-11 10:54 ` Vaibhav Gupta
2020-11-11 11:46 ` Jarkko Nikula
2020-12-02 15:31 ` Wolfram Sang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201107090442.GA107675@gmail.com \
--to=vaibhavgupta40@gmail.com \
--cc=ajayg@nvidia.com \
--cc=bhelgaas@google.com \
--cc=helgaas@kernel.org \
--cc=jarkko.nikula@linux.intel.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.