From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio@vger.kernel.org,
William Breathitt Gray <vilhelm.gray@gmail.com>,
Felipe Balbi <balbi@kernel.org>,
Raymond Tan <raymond.tan@intel.com>
Subject: Re: [PATCH v4] counter: Add support for Intel Quadrature Encoder Peripheral
Date: Fri, 11 Jun 2021 14:56:30 +0300 [thread overview]
Message-ID: <6d554842-8c28-c38b-58cd-9312cf71a419@linux.intel.com> (raw)
In-Reply-To: <20210603171233.37009042@jic23-huawei>
On 6/3/21 7:12 PM, Jonathan Cameron wrote:
> On Wed, 2 Jun 2021 14:32:59 +0300
> Jarkko Nikula <jarkko.nikula@linux.intel.com> wrote:
>> +static int intel_qep_suspend(struct device *dev)
>> +{
>> + struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
>
> to_pci_dev()
> Though if all you are doing is using it to then get the drvdata
> avoid the round trip. There have been a few patch sets tidying this up
> in recent years and good not to add the noise of having that happen here.
>
> struct intel_qep *qep = dev_get_drvdata(dev);
>
Now I remember, I got this dev_get_drvdata() idea here earlier but
implemented it first to another driver and Uwe had a good point about
kind of layer violation of relying dev_get_drvdata() to return what
pci_set_drvdata() set:
https://www.spinics.net/lists/linux-pwm/msg15325.html
Jarkko
prev parent reply other threads:[~2021-06-11 11:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-02 11:32 [PATCH v4] counter: Add support for Intel Quadrature Encoder Peripheral Jarkko Nikula
2021-06-02 14:20 ` William Breathitt Gray
2021-06-03 16:12 ` Jonathan Cameron
2021-06-04 13:57 ` Jarkko Nikula
2021-06-11 11:56 ` Jarkko Nikula [this message]
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=6d554842-8c28-c38b-58cd-9312cf71a419@linux.intel.com \
--to=jarkko.nikula@linux.intel.com \
--cc=balbi@kernel.org \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=raymond.tan@intel.com \
--cc=vilhelm.gray@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox