aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/mISDN/socket.c
diff options
context:
space:
mode:
authorMatthias Urlichs <smurf@smurf.noris.de>2008-08-15 18:04:33 -0400
committerKarsten Keil <kkeil@suse.de>2009-01-09 16:44:24 -0500
commit837468d135dcc49cdabc9fa92fc9550479f60704 (patch)
tree354aace7616729beac5ae52165b9470651145193 /drivers/isdn/mISDN/socket.c
parent8b6015f736125050722dbe59c4f943e78cd626f0 (diff)
mISDN: Use struct device name field
struct device already has a 'name' member, use it. Signed-off-by: Matthias Urlichs <matthias@urlichs.de> Signed-off-by: Karsten Keil <kkeil@suse.de>
Diffstat (limited to 'drivers/isdn/mISDN/socket.c')
-rw-r--r--drivers/isdn/mISDN/socket.c6
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 }