Re: [PATCH] max3100 driver

From: chri
Date: Sat Sep 20 2008 - 10:38:14 EST


On Sat, Sep 20, 2008 at 4:11 PM, Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> wrote:
>> +#define MAX3100_MAJOR 204
>> +#define MAX3100_MINOR 128
>> +/* 4 MAX3100s should be enough for everyone */
>> +#define MAX_MAX3100 4
>
> These need to be officially allocated if you need constant numbers
>

OK, I'll try to mail device@xxxxxxxxxx


>
>> + if (rxchars > 0)
>> + tty_flip_buffer_push(s->port.info->port.tty);
>> + if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
>
> If there has been a hangup the port.tty will be NULL...
>

I didn't notice an explicit test for port.tty being non-NULL in some
drivers. I took as an example sa1100 driver (since it needs polling of
control signals too). I'm missing the way these drivers take care to
not cause an access of a NULL pointer?

>
> Looks basically sound to me - just some minor cleanups needed.
>

Thanks, I will fix them and resubmitt


--
Christian Pellegrin, see http://www.evolware.org/chri/
"Real Programmers don't play tennis, or any other sport which requires
you to change clothes. Mountain climbing is OK, and Real Programmers
wear their climbing boots to work in case a mountain should suddenly
spring up in the middle of the computer room."
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/