Re: [PATCH v4 3/4] serial: mctrl_gpio: enable API usage only for initialized mctrl_gpios struct

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

 



On 05/23/2016 02:09 AM, Uwe Kleine-König wrote:
>>  	gpios->port = port;
>> >  
>> > @@ -193,7 +202,7 @@ struct mctrl_gpios *mctrl_gpio_init(struct uart_port *port, unsigned int idx)
>> >  			dev_err(port->dev,
>> >  				"failed to find corresponding irq for %s (idx=%d, err=%d)\n",
>> >  				mctrl_gpios_desc[i].name, idx, ret);
>> > -			return ERR_PTR(ret);
>> > +			return NULL;
> 
> Ditto, if a GPIO is used as handshake line and it doesn't have a
> corresponding irq, polling must be set up instead of simply ignoring the
> missing irq.

I agree that none of the "return NULL" changes are necessary.

However, note that it's not really possible to recover here by polling;
some of the gpios may have been claimed and some not when the irq
claim failure occurs.

How to know which gpios were claimed?

Regards,
Peter Hurley
--
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



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux