mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@denx.de>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: dzu@denx.de, hjk@hansjkoch.de, grant.likely@secretlab.ca,
	rob.herring@calxeda.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Allow binding drivers/uio/uio_pdrv_genirq.c to devices using command line option
Date: Tue, 18 Jun 2013 16:30:43 +0200	[thread overview]
Message-ID: <20130618143043.GC17361@amd.pavel.ucw.cz> (raw)
In-Reply-To: <20130618130216.GB15122@amd.pavel.ucw.cz>

On Tue 2013-06-18 15:02:16, Pavel Machek wrote:
> On Mon 2013-06-17 10:37:38, Greg KH wrote:
> > On Mon, Jun 17, 2013 at 03:47:41PM +0200, Pavel Machek wrote:
> > > Hi!
> > > 
> > > > This adds ability to bind uio driver to given open firmware device
> > > > using command line option. Thus, userspace driver can be developed and
> > > > used without modifying the kernel.
> > > > 
> > > > Signed-off-by: Pavel Machek <pavel@denx.de> 
> > > 
> > > Ping? Greg, could you apply this patch? Or is there someone else I
> > > should ask to apply it?
> > 
> > Ugh, Hans seems to have dropped off of the net for a long time now, so I
> > guess I'll start queueing up UIO patches again.  Care to resend this?
> 
> Here you go. It still applies to your -next tree.

And here's version that removes "const" that is no longer true. I
missed the compile warning before. Sorry,
								Pavel

-(cut here)-

This adds ability to bind uio driver to given open firmware device
using command line option. Thus, userspace driver can be developed and
used without modifying the kernel.

Signed-off-by: Pavel Machek <pavel@denx.de>
Tested-by: Detlev Zundel <dzu@denx.de>

diff --git a/drivers/uio/uio_pdrv_genirq.c b/drivers/uio/uio_pdrv_genirq.c
index d594dd9..9741549 100644
--- a/drivers/uio/uio_pdrv_genirq.c
+++ b/drivers/uio/uio_pdrv_genirq.c
@@ -258,10 +258,14 @@ static const struct dev_pm_ops uio_pdrv_genirq_dev_pm_ops = {
 };
 
 #ifdef CONFIG_OF
-static const struct of_device_id uio_of_genirq_match[] = {
-	{ /* empty for now */ },
+static struct of_device_id uio_of_genirq_match[] = {
+	{ /* This is filled with module_parm */ },
+	{ /* Sentinel */ },
 };
 MODULE_DEVICE_TABLE(of, uio_of_genirq_match);
+
+module_param_string(of_id, uio_of_genirq_match[0].compatible, 128, 0);
+MODULE_PARM_DESC(of_id, "Openfirmware id of the device to be handled by uio");
 #else
 # define uio_of_genirq_match NULL
 #endif


-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  reply	other threads:[~2013-06-18 14:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-12 18:43 Pavel Machek
2013-05-06 10:53 ` Pavel Machek
2013-05-17  0:58   ` Greg KH
2013-06-17 13:47 ` Pavel Machek
2013-06-17 17:37   ` Greg KH
2013-06-18  5:02     ` Sachin Kamat
2013-06-18 14:47       ` Greg KH
2013-06-18 13:02     ` Pavel Machek
2013-06-18 14:30       ` Pavel Machek [this message]
2013-06-18 17:58         ` Greg KH

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=20130618143043.GC17361@amd.pavel.ucw.cz \
    --to=pavel@denx.de \
    --cc=dzu@denx.de \
    --cc=grant.likely@secretlab.ca \
    --cc=gregkh@linuxfoundation.org \
    --cc=hjk@hansjkoch.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rob.herring@calxeda.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

all inboxes | Powered by JetHome®