lkml.org 
[lkml]   [2013]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] Allow binding drivers/uio/uio_pdrv_genirq.c to devices using command line option
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


\
 
 \ /
  Last update: 2013-06-18 17:01    [W:0.116 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site