ChangeSet 1.889.26.7, 2003/01/11 23:50:22-08:00, baldrick@wanadoo.fr [PATCH] remove redundant casts in speedtouch speedtouch: remove some redundant casts. diff -Nru a/drivers/usb/misc/speedtouch.c b/drivers/usb/misc/speedtouch.c --- a/drivers/usb/misc/speedtouch.c Mon Jan 13 14:27:07 2003 +++ b/drivers/usb/misc/speedtouch.c Mon Jan 13 14:27:07 2003 @@ -290,7 +290,7 @@ 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; if (!left--) @@ -325,8 +325,8 @@ ****************************************************************************/ 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_instance_data *instance = (struct udsl_instance_data *) vcc->dev->dev_data; + struct udsl_atm_dev_data *dev_data = vcc->dev_data; + struct udsl_instance_data *instance = vcc->dev->dev_data; struct sk_buff *new = NULL; int err; @@ -442,7 +442,7 @@ int udsl_atm_open (struct atm_vcc *vcc, short vpi, int vci) { 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"); @@ -451,8 +451,7 @@ return -EINVAL; MOD_INC_USE_COUNT; - dev_data = - (struct udsl_atm_dev_data *) kmalloc (sizeof (struct udsl_atm_dev_data), GFP_KERNEL); + dev_data = kmalloc (sizeof (struct udsl_atm_dev_data), GFP_KERNEL); if (!dev_data) return -ENOMEM; @@ -480,8 +479,8 @@ 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_instance_data *instance = (struct udsl_instance_data *) vcc->dev->dev_data; + struct udsl_atm_dev_data *dev_data = vcc->dev_data; + struct udsl_instance_data *instance = vcc->dev->dev_data; PDEBUG ("udsl_atm_close called\n"); @@ -532,7 +531,7 @@ 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; int err; @@ -658,7 +657,7 @@ PDEBUG ("udsl_usb_receive_data entered, got packet %p with length %d an status %d\n", urb, urb->actual_length, urb->status); - ctx = (struct udsl_data_ctx *) urb->context; + ctx = urb->context; if (!ctx || !ctx->skb) return; @@ -717,9 +716,7 @@ usb_maxpacket (instance->usb_dev, usb_sndbulkpipe (instance->usb_dev, UDSL_ENDPOINT_DATA_OUT), 0)); - instance->rcvbufs = - (struct udsl_data_ctx *) kmalloc (sizeof (struct udsl_data_ctx) * UDSL_NUMBER_RCV_URBS, - GFP_KERNEL); + instance->rcvbufs = kmalloc (sizeof (struct udsl_data_ctx) * UDSL_NUMBER_RCV_URBS, GFP_KERNEL); if (!instance->rcvbufs) return -ENOMEM;