diff options
Diffstat (limited to 'drivers/input/input.c')
-rw-r--r-- | drivers/input/input.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c index d95c34ee5dc1..067d648028a2 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c | |||
@@ -1749,7 +1749,7 @@ static const struct dev_pm_ops input_dev_pm_ops = { | |||
1749 | }; | 1749 | }; |
1750 | #endif /* CONFIG_PM */ | 1750 | #endif /* CONFIG_PM */ |
1751 | 1751 | ||
1752 | static struct device_type input_dev_type = { | 1752 | static const struct device_type input_dev_type = { |
1753 | .groups = input_dev_attr_groups, | 1753 | .groups = input_dev_attr_groups, |
1754 | .release = input_dev_release, | 1754 | .release = input_dev_release, |
1755 | .uevent = input_dev_uevent, | 1755 | .uevent = input_dev_uevent, |
@@ -2091,6 +2091,12 @@ int input_register_device(struct input_dev *dev) | |||
2091 | const char *path; | 2091 | const char *path; |
2092 | int error; | 2092 | int error; |
2093 | 2093 | ||
2094 | if (test_bit(EV_ABS, dev->evbit) && !dev->absinfo) { | ||
2095 | dev_err(&dev->dev, | ||
2096 | "Absolute device without dev->absinfo, refusing to register\n"); | ||
2097 | return -EINVAL; | ||
2098 | } | ||
2099 | |||
2094 | if (dev->devres_managed) { | 2100 | if (dev->devres_managed) { |
2095 | devres = devres_alloc(devm_input_device_unregister, | 2101 | devres = devres_alloc(devm_input_device_unregister, |
2096 | sizeof(struct input_devres), GFP_KERNEL); | 2102 | sizeof(struct input_devres), GFP_KERNEL); |