[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d120d5000611061418i65f27cd6w1c60692aff8bd1b1@mail.gmail.com>
Date: Mon, 6 Nov 2006 17:18:53 -0500
From: "Dmitry Torokhov" <dmitry.torokhov@...il.com>
To: "Andrew Morton" <akpm@...l.org>
Cc: "Burman Yan" <yan_952@...mail.com>, linux-kernel@...r.kernel.org,
"Jean Delvare" <khali@...ux-fr.org>
Subject: Re: [PATCH] HP Mobile data protection system driver with interrupt handling
On 11/6/06, Andrew Morton <akpm@...l.org> wrote:
> On Fri, 03 Nov 2006 18:33:31 +0200
> "Burman Yan" <yan_952@...mail.com> wrote:
> > +
> > +static unsigned int mouse = 0;
>
> The `= 0' is unneeded.
>
> > +module_param(mouse, bool, S_IRUGO);
> > +MODULE_PARM_DESC(mouse, "Enable the input class device on module load");
Does the parameter have to be called "mouse"? I'd rename it to "input"
and drop the work "class" from parameter description.
> > +
> > + if (input_register_device(mdps.idev)) {
> > + input_free_device(mdps.idev);
> > + mdps.idev = NULL;
> > + return;
> > + }
> > +
> > + mdps.kthread = kthread_run(mdps_mouse_kthread, NULL, "kmdps");
> > + if (IS_ERR(mdps.kthread)) {
> > + input_unregister_device(mdps.idev);
> > + mdps.idev = NULL;
> > + return;
> > + }
> > +
Please consider implementing mdps_input_open() and mdps_input_close()
and create and run the polling thread from there - there is no point
in polling the device if noone listens to its events.
--
Dmitry
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists