aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mousedev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/mousedev.c')
-rw-r--r--drivers/input/mousedev.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c
index 17fd6d46d082..966b8868f792 100644
--- a/drivers/input/mousedev.c
+++ b/drivers/input/mousedev.c
@@ -60,7 +60,6 @@ struct mousedev {
60 int exist; 60 int exist;
61 int open; 61 int open;
62 int minor; 62 int minor;
63 char name[16];
64 struct input_handle handle; 63 struct input_handle handle;
65 wait_queue_head_t wait; 64 wait_queue_head_t wait;
66 struct list_head client_list; 65 struct list_head client_list;
@@ -863,19 +862,17 @@ static struct mousedev *mousedev_create(struct input_dev *dev,
863 init_waitqueue_head(&mousedev->wait); 862 init_waitqueue_head(&mousedev->wait);
864 863
865 if (minor == MOUSEDEV_MIX) 864 if (minor == MOUSEDEV_MIX)
866 strlcpy(mousedev->name, "mice", sizeof(mousedev->name)); 865 dev_set_name(&mousedev->dev, "mice");
867 else 866 else
868 snprintf(mousedev->name, sizeof(mousedev->name), 867 dev_set_name(&mousedev->dev, "mouse%d", minor);
869 "mouse%d", minor);
870 868
871 mousedev->minor = minor; 869 mousedev->minor = minor;
872 mousedev->exist = 1; 870 mousedev->exist = 1;
873 mousedev->handle.dev = input_get_device(dev); 871 mousedev->handle.dev = input_get_device(dev);
874 mousedev->handle.name = mousedev->name; 872 mousedev->handle.name = dev_name(&mousedev->dev);
875 mousedev->handle.handler = handler; 873 mousedev->handle.handler = handler;
876 mousedev->handle.private = mousedev; 874 mousedev->handle.private = mousedev;
877 875
878 dev_set_name(&mousedev->dev, mousedev->name);
879 mousedev->dev.class = &input_class; 876 mousedev->dev.class = &input_class;
880 if (dev) 877 if (dev)
881 mousedev->dev.parent = &dev->dev; 878 mousedev->dev.parent = &dev->dev;