diff options
Diffstat (limited to 'drivers/isdn/mISDN/socket.c')
-rw-r--r-- | drivers/isdn/mISDN/socket.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/isdn/mISDN/socket.c b/drivers/isdn/mISDN/socket.c index 98fa6c4a4bd6..2f6d6e88ff2c 100644 --- a/drivers/isdn/mISDN/socket.c +++ b/drivers/isdn/mISDN/socket.c | |||
@@ -381,7 +381,7 @@ data_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | |||
381 | memcpy(di.channelmap, dev->channelmap, | 381 | memcpy(di.channelmap, dev->channelmap, |
382 | sizeof(di.channelmap)); | 382 | sizeof(di.channelmap)); |
383 | di.nrbchan = dev->nrbchan; | 383 | di.nrbchan = dev->nrbchan; |
384 | strcpy(di.name, dev->name); | 384 | strcpy(di.name, dev_name(&dev->dev)); |
385 | if (copy_to_user((void __user *)arg, &di, sizeof(di))) | 385 | if (copy_to_user((void __user *)arg, &di, sizeof(di))) |
386 | err = -EFAULT; | 386 | err = -EFAULT; |
387 | } else | 387 | } else |
@@ -639,7 +639,7 @@ base_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | |||
639 | memcpy(di.channelmap, dev->channelmap, | 639 | memcpy(di.channelmap, dev->channelmap, |
640 | sizeof(di.channelmap)); | 640 | sizeof(di.channelmap)); |
641 | di.nrbchan = dev->nrbchan; | 641 | di.nrbchan = dev->nrbchan; |
642 | strcpy(di.name, dev->name); | 642 | strcpy(di.name, dev_name(&dev->dev)); |
643 | if (copy_to_user((void __user *)arg, &di, sizeof(di))) | 643 | if (copy_to_user((void __user *)arg, &di, sizeof(di))) |
644 | err = -EFAULT; | 644 | err = -EFAULT; |
645 | } else | 645 | } else |
@@ -655,7 +655,7 @@ base_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | |||
655 | } | 655 | } |
656 | dev = get_mdevice(dn.id); | 656 | dev = get_mdevice(dn.id); |
657 | if (dev) | 657 | if (dev) |
658 | strlcpy(dev->name, dn.name, MISDN_MAX_IDLEN); | 658 | err = device_rename(&dev->dev, dn.name); |
659 | else | 659 | else |
660 | err = -ENODEV; | 660 | err = -ENODEV; |
661 | } | 661 | } |