From: Johan Hovold <johan@kernel.org>
To: Abhishek Bist <ishubist@gmail.com>
Cc: johan@kernel.org, gregkh@linuxfoundation.org,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] USB-SERIAL : Changing usb_serial_generic_open prototype
Date: Mon, 1 Jun 2015 16:30:13 +0200 [thread overview]
Message-ID: <20150601143013.GG27360@localhost> (raw)
In-Reply-To: <1432991840-24152-1-git-send-email-ishubist@gmail.com>
On Sat, May 30, 2015 at 06:47:20PM +0530, Abhishek Bist wrote:
> While designing a usb to uart converter driver open function I am using
> usb_serial_generic_open, but wouldn't find need to pass tty as an argument.
> As it is not performing any task for further significance.
> So, This patch proposed a change in usb_serial_generic_open
> function prototype which has struct tty_struct as a first argument.
>
> usb_serial_generic_open(struct tty_struct *tty,
> struct usb_serial_port *port);
>
> Signed-off-by: Abhishek Bist <ishubist@gmail.com>
> diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h
> index 704a1ab..c8ed44a 100644
> --- a/include/linux/usb/serial.h
> +++ b/include/linux/usb/serial.h
> @@ -318,8 +318,7 @@ static inline void usb_serial_console_disconnect(struct usb_serial *serial) {}
> /* Functions needed by other parts of the usbserial core */
> extern struct usb_serial_port *usb_serial_port_get_by_minor(unsigned int minor);
> extern void usb_serial_put(struct usb_serial *serial);
> -extern int usb_serial_generic_open(struct tty_struct *tty,
> - struct usb_serial_port *port);
> +extern int usb_serial_generic_open(struct usb_serial_port *port);
> extern int usb_serial_generic_write_start(struct usb_serial_port *port,
> gfp_t mem_flags);
> extern int usb_serial_generic_write(struct tty_struct *tty,
This does not work as usb_serial_generic_open is the default driver
callback.
If you had compile tested your patch you would have seen the following
warning:
linux/drivers/usb/serial/usb-serial.c: In function 'usb_serial_operations_init':
linux/drivers/usb/serial/usb-serial.c:1318:19: warning: assignment from incompatible pointer type
type->function = usb_serial_generic_##function; \
^
linux/drivers/usb/serial/usb-serial.c:1326:2: note: in expansion of macro 'set_to_generic_if_null'
set_to_generic_if_null(device, open);
^
Johan
next prev parent reply other threads:[~2015-06-01 14:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-30 13:17 [PATCH 1/1] USB-SERIAL : Changing usb_serial_generic_open prototype Abhishek Bist
2015-06-01 14:30 ` Johan Hovold [this message]
2015-06-02 9:19 ` Abhishek bist
2015-06-02 9:28 ` Johan Hovold
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150601143013.GG27360@localhost \
--to=johan@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=ishubist@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox