Commit a47ee431 authored by Duncan Sands's avatar Duncan Sands Committed by Greg Kroah-Hartman

[PATCH] remove redundant casts in speedtouch

  speedtouch: remove some redundant casts.
parent 1aacc52c
...@@ -290,7 +290,7 @@ struct sk_buff *udsl_atm_alloc_tx (struct atm_vcc *vcc, unsigned int size) ...@@ -290,7 +290,7 @@ struct sk_buff *udsl_atm_alloc_tx (struct atm_vcc *vcc, unsigned int size)
int udsl_atm_proc_read (struct atm_dev *atm_dev, loff_t * pos, char *page) int udsl_atm_proc_read (struct atm_dev *atm_dev, loff_t * pos, char *page)
{ {
struct udsl_instance_data *instance = (struct udsl_instance_data *) atm_dev->dev_data; struct udsl_instance_data *instance = atm_dev->dev_data;
int left = *pos; int left = *pos;
if (!left--) if (!left--)
...@@ -325,8 +325,8 @@ int udsl_atm_proc_read (struct atm_dev *atm_dev, loff_t * pos, char *page) ...@@ -325,8 +325,8 @@ int udsl_atm_proc_read (struct atm_dev *atm_dev, loff_t * pos, char *page)
****************************************************************************/ ****************************************************************************/
int udsl_atm_send (struct atm_vcc *vcc, struct sk_buff *skb) int udsl_atm_send (struct atm_vcc *vcc, struct sk_buff *skb)
{ {
struct udsl_atm_dev_data *dev_data = (struct udsl_atm_dev_data *) vcc->dev_data; struct udsl_atm_dev_data *dev_data = vcc->dev_data;
struct udsl_instance_data *instance = (struct udsl_instance_data *) vcc->dev->dev_data; struct udsl_instance_data *instance = vcc->dev->dev_data;
struct sk_buff *new = NULL; struct sk_buff *new = NULL;
int err; int err;
...@@ -442,7 +442,7 @@ void udsl_atm_processqueue (unsigned long data) ...@@ -442,7 +442,7 @@ void udsl_atm_processqueue (unsigned long data)
int udsl_atm_open (struct atm_vcc *vcc, short vpi, int vci) int udsl_atm_open (struct atm_vcc *vcc, short vpi, int vci)
{ {
struct udsl_atm_dev_data *dev_data; struct udsl_atm_dev_data *dev_data;
struct udsl_instance_data *instance = (struct udsl_instance_data *) vcc->dev->dev_data; struct udsl_instance_data *instance = vcc->dev->dev_data;
PDEBUG ("udsl_atm_open called\n"); PDEBUG ("udsl_atm_open called\n");
...@@ -451,8 +451,7 @@ int udsl_atm_open (struct atm_vcc *vcc, short vpi, int vci) ...@@ -451,8 +451,7 @@ int udsl_atm_open (struct atm_vcc *vcc, short vpi, int vci)
return -EINVAL; return -EINVAL;
MOD_INC_USE_COUNT; MOD_INC_USE_COUNT;
dev_data = dev_data = kmalloc (sizeof (struct udsl_atm_dev_data), GFP_KERNEL);
(struct udsl_atm_dev_data *) kmalloc (sizeof (struct udsl_atm_dev_data), GFP_KERNEL);
if (!dev_data) if (!dev_data)
return -ENOMEM; return -ENOMEM;
...@@ -480,8 +479,8 @@ int udsl_atm_open (struct atm_vcc *vcc, short vpi, int vci) ...@@ -480,8 +479,8 @@ int udsl_atm_open (struct atm_vcc *vcc, short vpi, int vci)
void udsl_atm_close (struct atm_vcc *vcc) void udsl_atm_close (struct atm_vcc *vcc)
{ {
struct udsl_atm_dev_data *dev_data = (struct udsl_atm_dev_data *) vcc->dev_data; struct udsl_atm_dev_data *dev_data = vcc->dev_data;
struct udsl_instance_data *instance = (struct udsl_instance_data *) vcc->dev->dev_data; struct udsl_instance_data *instance = vcc->dev->dev_data;
PDEBUG ("udsl_atm_close called\n"); PDEBUG ("udsl_atm_close called\n");
...@@ -532,7 +531,7 @@ struct udsl_cb { ...@@ -532,7 +531,7 @@ struct udsl_cb {
static void udsl_usb_send_data_complete (struct urb *urb, struct pt_regs *regs) static void udsl_usb_send_data_complete (struct urb *urb, struct pt_regs *regs)
{ {
struct udsl_usb_send_data_context *ctx = (struct udsl_usb_send_data_context *) urb->context; struct udsl_usb_send_data_context *ctx = urb->context;
struct udsl_instance_data *instance = ctx->instance; struct udsl_instance_data *instance = ctx->instance;
int err; int err;
...@@ -658,7 +657,7 @@ void udsl_usb_data_receive (struct urb *urb, struct pt_regs *regs) ...@@ -658,7 +657,7 @@ void udsl_usb_data_receive (struct urb *urb, struct pt_regs *regs)
PDEBUG ("udsl_usb_receive_data entered, got packet %p with length %d an status %d\n", urb, PDEBUG ("udsl_usb_receive_data entered, got packet %p with length %d an status %d\n", urb,
urb->actual_length, urb->status); urb->actual_length, urb->status);
ctx = (struct udsl_data_ctx *) urb->context; ctx = urb->context;
if (!ctx || !ctx->skb) if (!ctx || !ctx->skb)
return; return;
...@@ -717,9 +716,7 @@ int udsl_usb_data_init (struct udsl_instance_data *instance) ...@@ -717,9 +716,7 @@ int udsl_usb_data_init (struct udsl_instance_data *instance)
usb_maxpacket (instance->usb_dev, usb_maxpacket (instance->usb_dev,
usb_sndbulkpipe (instance->usb_dev, UDSL_ENDPOINT_DATA_OUT), 0)); usb_sndbulkpipe (instance->usb_dev, UDSL_ENDPOINT_DATA_OUT), 0));
instance->rcvbufs = instance->rcvbufs = kmalloc (sizeof (struct udsl_data_ctx) * UDSL_NUMBER_RCV_URBS, GFP_KERNEL);
(struct udsl_data_ctx *) kmalloc (sizeof (struct udsl_data_ctx) * UDSL_NUMBER_RCV_URBS,
GFP_KERNEL);
if (!instance->rcvbufs) if (!instance->rcvbufs)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment