USB: serial: io_ti: clean up vendor-request helpers
Clean up the vendor-request helpers by using kernel-types consistently and using void pointers for the data arguments, which allows removing a cast from one caller. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
This commit is contained in:
parent
bd49224a2e
commit
e8d89db01a
@ -252,8 +252,8 @@ static int edge_remove_sysfs_attrs(struct usb_serial_port *port);
|
|||||||
#define TI_VSEND_TIMEOUT_DEFAULT 1000
|
#define TI_VSEND_TIMEOUT_DEFAULT 1000
|
||||||
#define TI_VSEND_TIMEOUT_FW_DOWNLOAD 10000
|
#define TI_VSEND_TIMEOUT_FW_DOWNLOAD 10000
|
||||||
|
|
||||||
static int ti_vread_sync(struct usb_device *dev, __u8 request,
|
static int ti_vread_sync(struct usb_device *dev, u8 request, u16 value,
|
||||||
__u16 value, __u16 index, u8 *data, int size)
|
u16 index, void *data, int size)
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
@ -271,7 +271,7 @@ static int ti_vread_sync(struct usb_device *dev, __u8 request,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int ti_vsend_sync(struct usb_device *dev, u8 request, u16 value,
|
static int ti_vsend_sync(struct usb_device *dev, u8 request, u16 value,
|
||||||
u16 index, u8 *data, int size, int timeout)
|
u16 index, void *data, int size, int timeout)
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
@ -284,9 +284,8 @@ static int ti_vsend_sync(struct usb_device *dev, u8 request, u16 value,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int send_cmd(struct usb_device *dev, __u8 command,
|
static int send_cmd(struct usb_device *dev, u8 command, u8 moduleid,
|
||||||
__u8 moduleid, __u16 value, u8 *data,
|
u16 value, void *data, int size)
|
||||||
int size)
|
|
||||||
{
|
{
|
||||||
return ti_vsend_sync(dev, command, value, moduleid, data, size,
|
return ti_vsend_sync(dev, command, value, moduleid, data, size,
|
||||||
TI_VSEND_TIMEOUT_DEFAULT);
|
TI_VSEND_TIMEOUT_DEFAULT);
|
||||||
@ -2354,7 +2353,7 @@ static void change_port_settings(struct tty_struct *tty,
|
|||||||
|
|
||||||
status = send_cmd(edge_port->port->serial->dev, UMPC_SET_CONFIG,
|
status = send_cmd(edge_port->port->serial->dev, UMPC_SET_CONFIG,
|
||||||
(__u8)(UMPM_UART1_PORT + port_number),
|
(__u8)(UMPM_UART1_PORT + port_number),
|
||||||
0, (__u8 *)config, sizeof(*config));
|
0, config, sizeof(*config));
|
||||||
if (status)
|
if (status)
|
||||||
dev_dbg(dev, "%s - error %d when trying to write config to device\n",
|
dev_dbg(dev, "%s - error %d when trying to write config to device\n",
|
||||||
__func__, status);
|
__func__, status);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user