All of lore.kernel.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v9 1/1] PRUSS UIO driver support
Date: Tue, 8 Mar 2011 14:24:00 +0100	[thread overview]
Message-ID: <201103081424.01476.arnd@arndb.de> (raw)
In-Reply-To: <alpine.LFD.2.00.1103081133510.2787@localhost6.localdomain6>

On Tuesday 08 March 2011, Thomas Gleixner wrote:
> > 
> > +static irqreturn_t pruss_handler(int irq, struct uio_info *info) {
> > +     struct pruss_priv *priv = info->priv;
> > +     struct uio_pruss_dev *gdev = priv->pupdev;
> > 
> > Note that info is a pointer to array supporting 8 interrupts. This allows to
> > redirect to driver structure via info->priv quickly.
> 
> struct uio_pruss_dev *dev = container_of(info, struct uio_pruss_dev, info);
> 
> Perhaps ?

That would require having the same number of uio_info structs as uio_pruss_dev
instances. Right now, one platform device has one uio_pruss_dev instance, which
has 8 uio_info instances, so the container_of() trick doesn't work.

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: "TK, Pratheesh Gangadhar" <pratheesh@ti.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"hjk@hansjkoch.de" <hjk@hansjkoch.de>,
	"gregkh@suse.de" <gregkh@suse.de>,
	"sshtylyov@mvista.com" <sshtylyov@mvista.com>,
	"Chatterjee, Amit" <amit.chatterjee@ti.com>,
	"davinci-linux-open-source@linux.davincidsp.com" 
	<davinci-linux-open-source@linux.davincidsp.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v9 1/1] PRUSS UIO driver support
Date: Tue, 8 Mar 2011 14:24:00 +0100	[thread overview]
Message-ID: <201103081424.01476.arnd@arndb.de> (raw)
In-Reply-To: <alpine.LFD.2.00.1103081133510.2787@localhost6.localdomain6>

On Tuesday 08 March 2011, Thomas Gleixner wrote:
> > 
> > +static irqreturn_t pruss_handler(int irq, struct uio_info *info) {
> > +     struct pruss_priv *priv = info->priv;
> > +     struct uio_pruss_dev *gdev = priv->pupdev;
> > 
> > Note that info is a pointer to array supporting 8 interrupts. This allows to
> > redirect to driver structure via info->priv quickly.
> 
> struct uio_pruss_dev *dev = container_of(info, struct uio_pruss_dev, info);
> 
> Perhaps ?

That would require having the same number of uio_info structs as uio_pruss_dev
instances. Right now, one platform device has one uio_pruss_dev instance, which
has 8 uio_info instances, so the container_of() trick doesn't work.

	Arnd

  reply	other threads:[~2011-03-08 13:24 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-03 18:07 [PATCH v9 0/1] Add PRUSS UIO driver support Pratheesh Gangadhar
2011-03-03 18:07 ` Pratheesh Gangadhar
2011-03-03 18:07 ` [PATCH v9 1/1] " Pratheesh Gangadhar
2011-03-03 18:07   ` Pratheesh Gangadhar
2011-03-03 18:15   ` Arnd Bergmann
2011-03-03 18:15     ` Arnd Bergmann
2011-03-04  3:25     ` TK, Pratheesh Gangadhar
2011-03-04  3:25       ` TK, Pratheesh Gangadhar
2011-03-08 10:34       ` Thomas Gleixner
2011-03-08 10:34         ` Thomas Gleixner
2011-03-08 13:24         ` Arnd Bergmann [this message]
2011-03-08 13:24           ` Arnd Bergmann
2011-03-08 15:01           ` Thomas Gleixner
2011-03-08 15:01             ` Thomas Gleixner
2011-03-04  4:40     ` TK, Pratheesh Gangadhar
2011-03-04  4:40       ` TK, Pratheesh Gangadhar

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=201103081424.01476.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.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.