X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fatm%2Fhe.c;h=71e5b5146004074dab2f13da11da9481fb811b1a;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=72123ecfb3b7e3087f5c916c3556d4b28829ea78;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/drivers/atm/he.c b/drivers/atm/he.c index 72123ecfb..71e5b5146 100644 --- a/drivers/atm/he.c +++ b/drivers/atm/he.c @@ -134,7 +134,7 @@ static char *version = "$Id: he.c,v 1.18 2003/05/06 22:57:15 chas Exp $"; static int he_open(struct atm_vcc *vcc); static void he_close(struct atm_vcc *vcc); static int he_send(struct atm_vcc *vcc, struct sk_buff *skb); -static int he_ioctl(struct atm_dev *dev, unsigned int cmd, void *arg); +static int he_ioctl(struct atm_dev *dev, unsigned int cmd, void __user *arg); static irqreturn_t he_irq_handler(int irq, void *dev_id, struct pt_regs *regs); static void he_tasklet(unsigned long data); static int he_proc_read(struct atm_dev *dev,loff_t *pos,char *page); @@ -360,7 +360,7 @@ he_init_one(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent) goto init_one_failure; } - atm_dev = atm_dev_register(DEV_LABEL, &he_ops, -1, 0); + atm_dev = atm_dev_register(DEV_LABEL, &he_ops, -1, NULL); if (!atm_dev) { err = -ENODEV; goto init_one_failure; @@ -2809,7 +2809,7 @@ he_send(struct atm_vcc *vcc, struct sk_buff *skb) } static int -he_ioctl(struct atm_dev *atm_dev, unsigned int cmd, void *arg) +he_ioctl(struct atm_dev *atm_dev, unsigned int cmd, void __user *arg) { unsigned long flags; struct he_dev *he_dev = HE_DEV(atm_dev); @@ -2821,8 +2821,8 @@ he_ioctl(struct atm_dev *atm_dev, unsigned int cmd, void *arg) if (!capable(CAP_NET_ADMIN)) return -EPERM; - if (copy_from_user(®, (struct he_ioctl_reg *) arg, - sizeof(struct he_ioctl_reg))) + if (copy_from_user(®, arg, + sizeof(struct he_ioctl_reg))) return -EFAULT; spin_lock_irqsave(&he_dev->global_lock, flags); @@ -2848,7 +2848,7 @@ he_ioctl(struct atm_dev *atm_dev, unsigned int cmd, void *arg) } spin_unlock_irqrestore(&he_dev->global_lock, flags); if (err == 0) - if (copy_to_user((struct he_ioctl_reg *) arg, ®, + if (copy_to_user(arg, ®, sizeof(struct he_ioctl_reg))) return -EFAULT; break;