[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <61D8D34BB13CFE408D154529C120E079032320E6@eseldmw101.eemea.ericsson.se>
Date: Fri, 22 Jan 2010 12:07:43 +0100
From: Sjur Brændeland <sjur.brandeland@...ricsson.com>
To: "Randy Dunlap" <randy.dunlap@...cle.com>
Cc: <netdev@...r.kernel.org>, <davem@...emloft.net>,
<marcel@...tmann.org>, <stefano.babic@...ic.homelinux.org>
Subject: RE: [PATCH net-next-2.6 13/13] net-caif-driver: add CAIF serial driver (ldisc)
Hi Randy.
Randy Dunlap wrote:
>> +++ b/drivers/net/caif/caif_serial.c
>> +struct net_device *device;
>> +char *ser_ttyname = "/dev/ttyS0";
>> +module_param(ser_ttyname, charp, S_IRUGO);
>> +MODULE_PARM_DESC(ser_ttyname, "TTY to open.");
>> +
>
> Can't a lot of these data items be static? (above & below)
Yes, you're right. Thank you.
....
>> +static int start_ldisc(struct ser_device *ser) {
>> + struct file *f;
>> + mm_segment_t oldfs;
>> + struct termios tio;
>> + int ldiscnr = N_CAIF;
>> + int ret;
>> + f = filp_open(ser->tty_name, 0, 0);
>> + if (IS_ERR(f)) {
>> + dev_err(&ser->dev->dev, "CAIF cannot open:%s\n", ser->tty_name);
>> + ret = -EINVAL; + goto error;
>> + }
>> + if (f == NULL || f->f_op == NULL || f->f_op->unlocked_ioctl ==
>> NULL) { + dev_err(&ser->dev->dev, "TTY cannot do IOCTL:%s\n",
>> + ser->tty_name); + ret = -EINVAL;
>
> I'm thinking that the errcode should be (negative) ENOTTY...
Yes, agree - I'll fix this.
BR/Sjur
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists