The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Adam Belay <ambx1@neo.rr.com>
To: Greg KH <greg@kroah.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pnp.h changes - 2.5.46 (4/6)
Date: Thu, 7 Nov 2002 19:25:51 +0000	[thread overview]
Message-ID: <20021107192551.GB352@neo.rr.com> (raw)
In-Reply-To: <20021107060102.GB26821@kroah.com>

On Wed, Nov 06, 2002 at 10:01:02PM -0800, Greg KH wrote:
> On Wed, Nov 06, 2002 at 09:06:39PM +0000, Adam Belay wrote:
> >  
> > +static inline void *pnp_get_drvdata (struct pnp_dev *pdev)
> > +{
> > +	return pdev->dev.driver_data;
> > +}
> > +
> > +static inline void pnp_set_drvdata (struct pnp_dev *pdev, void *data)
> > +{
> > +	pdev->dev.driver_data = data;
> > +}
> > +
> > +static inline void *pnp_get_protodata (struct pnp_dev *pdev)
> > +{
> > +	return pdev->protocol_data;
> > +}
> > +
> > +static inline void pnp_set_protodata (struct pnp_dev *pdev, void *data)
> > +{
> > +	pdev->protocol_data = data;
> > +}
>
> Any reason for not just using dev_get_drvdata() and dev_set_drvdata() in
> the drivers?  Or at the least, use them within these functions, that's
> what they are there for :)
>
> thanks,
>
> greg k-h


Sure, here's a patch.  I think I'll use them within these functions.

Thanks,
Adam



Is this ok?



diff -ur a/include/linux/pnp.h b/include/linux/pnp.h
--- a/include/linux/pnp.h	Wed Nov  6 17:52:11 2002
+++ b/include/linux/pnp.h	Thu Nov  7 19:19:07 2002
@@ -75,12 +75,12 @@

 static inline void *pnp_get_drvdata (struct pnp_dev *pdev)
 {
-	return pdev->dev.driver_data;
+	return dev_get_drvdata(&pdev->dev);
 }

 static inline void pnp_set_drvdata (struct pnp_dev *pdev, void *data)
 {
-	pdev->dev.driver_data = data;
+	dev_set_drvdata(&pdev->dev, data);
 }

 static inline void *pnp_get_protodata (struct pnp_dev *pdev)

      reply	other threads:[~2002-11-08  0:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-06 21:06 [PATCH] pnp.h changes - 2.5.46 (4/6) Adam Belay
2002-11-07  6:01 ` Greg KH
2002-11-07 19:25   ` Adam Belay [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=20021107192551.GB352@neo.rr.com \
    --to=ambx1@neo.rr.com \
    --cc=greg@kroah.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox