Re: [PATCH] input: altera_ps2: Store struct serio in struct ps2if

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 07, 2012 at 09:03:25PM +0100, Tobias Klauser wrote:
> Hi Dmitry
> 
> On 2012-03-07 at 18:25:24 +0100, Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx> wrote:
> > On Wed, Mar 07, 2012 at 02:44:24PM +0100, Tobias Klauser wrote:
> > > It doesn't make much sense to allocate struct ps2if and struct serio
> > > separately as they're allocated and used in conjunction.
> > > 
> > 
> > Actually, it does. Serio is a refcounted structure and has different
> > lifetime rules than struct ps2if. It may get deleted by
> > serio_unregister_port() or it may live on until after ps2if is freed and
> > altera_ps2 module is unloaded and it should stay allocated separately.
> 
> Oh, sorry. I didn't look careful enough then. Thanks a lot for clearing
> that up!
> 
> I was looking at xilinx_ps2 and figured they do it like this. Would that
> mean a "bug" there, or am I mislead again?

Yes, there is a bug, thanks for letting me know.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux