summaryrefslogtreecommitdiff
path: root/drivers/isdn/mISDN/socket.c
diff options
context:
space:
mode:
authorMatthias Urlichs <smurf@smurf.noris.de>2008-08-16 00:04:33 +0200
committerKarsten Keil <kkeil@suse.de>2009-01-09 22:44:24 +0100
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)
memcpy(di.channelmap, dev->channelmap,
sizeof(di.channelmap));
di.nrbchan = dev->nrbchan;
- strcpy(di.name, dev->name);
+ strcpy(di.name, dev_name(&dev->dev));
if (copy_to_user((void __user *)arg, &di, sizeof(di)))
err = -EFAULT;
} else
@@ -639,7 +639,7 @@ base_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
memcpy(di.channelmap, dev->channelmap,
sizeof(di.channelmap));
di.nrbchan = dev->nrbchan;
- strcpy(di.name, dev->name);
+ strcpy(di.name, dev_name(&dev->dev));
if (copy_to_user((void __user *)arg, &di, sizeof(di)))
err = -EFAULT;
} else
@@ -655,7 +655,7 @@ base_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
}
dev = get_mdevice(dn.id);
if (dev)
- strlcpy(dev->name, dn.name, MISDN_MAX_IDLEN);
+ err = device_rename(&dev->dev, dn.name);
else
err = -ENODEV;
}