linux/drivers/misc/lis3lv02d
Hans de Goede bb6886bf1e misc: lis3lv02d: Change lis3lv02d_init_device() return value for unknown sensors to -ENODEV
Modern HP laptops do not necessarily actually contain a lis3lv02d
sensor, yet they still define a HPQ6007 device in there ACPI tables.

This leads to the following messages being logged in dmesg:

[   17.376342] hp_accel: laptop model unknown, using default axes configuration
[   17.399766] lis3lv02d: unknown sensor type 0x0
[   17.399804] hp_accel: probe of HPQ6007:00 failed with error -22

The third message is unnecessary and does not provide any useful info,
change the return value for unknown sensors to -ENODEV. This is the
proper return value to indicate that the driver will not be handling the
device and it silences the pr_warn printing the third message.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=199715
Link: https://lore.kernel.org/r/20210217102501.31758-2-hdegoede@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-24 08:26:29 +01:00
..
Kconfig Merge 5.2-rc4 into char-misc-next 2019-06-09 09:11:21 +02:00
lis3lv02d_i2c.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
lis3lv02d_spi.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 332 2019-06-05 17:37:06 +02:00
lis3lv02d.c misc: lis3lv02d: Change lis3lv02d_init_device() return value for unknown sensors to -ENODEV 2021-03-24 08:26:29 +01:00
lis3lv02d.h lis3lv02d: switch to using input device polling mode 2019-10-10 15:24:19 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00