unsigned int cmd, unsigned long arg)
{
struct retu_tahvo_write_parms par;
+ int ret;
switch (cmd) {
case URT_IOCT_IRQ_SUBSCR:
case RETU_IOCH_READ:
return retu_user_read_with_mask(arg);
case RETU_IOCX_WRITE:
- copy_from_user(&par, (void __user *) arg, sizeof(par));
+ ret = copy_from_user(&par, (void __user *) arg, sizeof(par));
+ if (ret)
+ printk(KERN_ERR "copy_from_user failed: %d\n", ret);
par.result = retu_user_write_with_mask(par.field, par.value);
- copy_to_user((void __user *) arg, &par, sizeof(par));
+ ret = copy_to_user((void __user *) arg, &par, sizeof(par));
+ if (ret)
+ printk(KERN_ERR "copy_to_user failed: %d\n", ret);
break;
case RETU_IOCH_ADC_READ:
return retu_read_adc(arg);
list_move(&irq->node, &retu_irqs_reserve);
spin_unlock_irqrestore(&retu_irqs_lock, flags);
- copy_to_user(buf + i * sizeof(irq_id), &irq_id, sizeof(irq_id));
-
+ ret = copy_to_user(buf + i * sizeof(irq_id), &irq_id,
+ sizeof(irq_id));
+ if (ret)
+ printk(KERN_ERR "copy_to_user failed: %d\n", ret);
}
return count;
}
/* Attributes */
- device_create_file(dev, &dev_attr_vbus_state);
+ ret = device_create_file(dev, &dev_attr_vbus_state);
#ifdef CONFIG_USB_OTG
- device_create_file(dev, &dev_attr_otg_mode);
+ ret |= device_create_file(dev, &dev_attr_otg_mode);
#endif
+ if (ret)
+ printk(KERN_ERR "attribute creation failed: %d\n", ret);
/* Create OTG interface */
tahvo_usb_power_off(tu);
unsigned int cmd, unsigned long arg)
{
struct retu_tahvo_write_parms par;
+ int ret;
switch (cmd) {
case URT_IOCT_IRQ_SUBSCR:
case TAHVO_IOCH_READ:
return tahvo_user_read_with_mask(arg);
case TAHVO_IOCX_WRITE:
- copy_from_user(&par, (void __user *) arg, sizeof(par));
+ ret = copy_from_user(&par, (void __user *) arg, sizeof(par));
+ if (ret)
+ printk(KERN_ERR "copy_from_user failed: %d\n", ret);
par.result = tahvo_user_write_with_mask(par.field, par.value);
- copy_to_user((void __user *) arg, &par, sizeof(par));
+ ret = copy_to_user((void __user *) arg, &par, sizeof(par));
+ if (ret)
+ printk(KERN_ERR "copy_to_user failed: %d\n", ret);
break;
default:
return -ENOIOCTLCMD;
list_move(&irq->node, &tahvo_irqs_reserve);
spin_unlock_irqrestore(&tahvo_irqs_lock, flags);
- copy_to_user(buf + i * sizeof(irq_id), &irq_id, sizeof(irq_id));
+ ret = copy_to_user(buf + i * sizeof(irq_id), &irq_id,
+ sizeof(irq_id));
+ if (ret)
+ printk(KERN_ERR "copy_to_user failed: %d\n", ret);
}
return count;
return nand_read_reg8(NND_ACCESS);
}
-static void omap_nand_write_byte(struct mtd_info *mtd, u_char byte)
-{
- nand_write_reg8(NND_ACCESS, byte);
-}
-
static int omap_nand_dev_ready(struct mtd_info *mtd)
{
u32 l;