> -----Original Message----- > From: Greg KH [mailto:gregkh@xxxxxxxxxxxxxxxxxxx] > Sent: Tuesday, July 24, 2018 5:41 PM > To: Vabhav Sharma <vabhav.sharma@xxxxxxx> > Cc: linux-serial@xxxxxxxxxxxxxxx; linux-kernel-owner@xxxxxxxxxxxxxxx; Yuan > Yao <yao.yuan@xxxxxxx> > Subject: Re: [PATCH v2] serial: fsl_lpuart: Remove the alias node dependence > > On Mon, Jul 23, 2018 at 02:09:46AM +0530, Vabhav wrote: > > From: Vabhav Sharma <vabhav.sharma@xxxxxxx> > > > > Numbering the ttyLPn space should not depend on the generic name > > "serial<n>". > > > > If don't add the alias node like:"serial0 = &lpuart0;", then lpuart > > will probe failed: > > [ 0.773410] fsl-lpuart 2950000.serial: failed to get alias id, errno -19 > > > > So remove the alias node dependence, and add the support for allocate > > the line port automatically. > > > > v2: > > Incorporated Review comments > > > https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpat > > > chwork.kernel.org%2Fpatch%2F9473977%2F&data=02%7C01%7Cvabha > v.sharm > > > a%40nxp.com%7C028a0020e981470541ce08d5f15e88ff%7C686ea1d3bc2b4c > 6fa92cd > > > 99c5c301635%7C0%7C0%7C636680310684892503&sdata=riRe4USVJh0tI > %2FlPG > > p0iSuMzloqiQ9nwUEhsbDv8tbo%3D&reserved=0 > > > > Signed-off-by: Yuan Yao <yao.yuan@xxxxxxx> > > Signed-off-by: Vabhav Sharma <vabhav.sharma@xxxxxxx> > > --- > > drivers/tty/serial/fsl_lpuart.c | 11 +++++++++-- > > 1 file changed, 9 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/tty/serial/fsl_lpuart.c > > b/drivers/tty/serial/fsl_lpuart.c index 51e47a6..00f06eb 100644 > > --- a/drivers/tty/serial/fsl_lpuart.c > > +++ b/drivers/tty/serial/fsl_lpuart.c > > @@ -232,6 +232,8 @@ > > /* IMX lpuart has four extra unused regs located at the beginning */ > > #define IMX_REG_OFF 0x10 > > > > +static DEFINE_IDA(fsl_lpuart_ida); > > You forgot to clean up the memory used by this structure when your module > is unloaded. Yeah, it's not obvious, go blame the authors of the ida interface > for that mess :) Thanks, Agree. Looking at the available interface in include/linux/idr.h I will add ida_destroy(&fsl_lpuart_ida) in lpuart_serial_exit() during module_exit() call, Please confirm if this is ok to send updated v3 version. > > greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html