History log of /linux-master/drivers/platform/x86/hdaps.c
Revision Date Author Comments
# 8d05fc03 30-Sep-2022 Barnabás Pőcze <pobrn@protonmail.com>

platform/x86: use PLATFORM_DEVID_NONE instead of -1

Use the `PLATFORM_DEVID_NONE` constant instead of
hard-coding -1 when creating a platform device.

No functional changes are intended.

Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
Link: https://lore.kernel.org/r/20220930104857.2796923-1-pobrn@protonmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>


# c297937f 05-Jun-2021 Rikard Falkeborn <rikard.falkeborn@gmail.com>

platform/x86: hdaps: Constify static attribute_group struct

The only use of hdaps_attribute_group is to pass its address to
sysfs_create_group() and sysfs_remove_group(), both which takes pointers
to const attribute_group structs. Make it const to allow the compiler to
put it in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Reviewed-by: Frank Seidel <frank@f-seidel.de>
Link: https://lore.kernel.org/r/20210605203807.60547-2-rikard.falkeborn@gmail.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>


# 3f649ab7 03-Jun-2020 Kees Cook <keescook@chromium.org>

treewide: Remove uninitialized_var() usage

Using uninitialized_var() is dangerous as it papers over real bugs[1]
(or can in the future), and suppresses unrelated compiler warnings
(e.g. "unused variable"). If the compiler thinks it is uninitialized,
either simply initialize the variable or make compiler changes.

In preparation for removing[2] the[3] macro[4], remove all remaining
needless uses with the following script:

git grep '\buninitialized_var\b' | cut -d: -f1 | sort -u | \
xargs perl -pi -e \
's/\buninitialized_var\(([^\)]+)\)/\1/g;
s:\s*/\* (GCC be quiet|to make compiler happy) \*/$::g;'

drivers/video/fbdev/riva/riva_hw.c was manually tweaked to avoid
pathological white-space.

No outstanding warnings were found building allmodconfig with GCC 9.3.0
for x86_64, i386, arm64, arm, powerpc, powerpc64le, s390x, mips, sparc64,
alpha, and m68k.

[1] https://lore.kernel.org/lkml/20200603174714.192027-1-glider@google.com/
[2] https://lore.kernel.org/lkml/CA+55aFw+Vbj0i=1TGqCR5vQkCzWJ0QxK6CernOU6eedsudAixw@mail.gmail.com/
[3] https://lore.kernel.org/lkml/CA+55aFwgbgqhbp1fkxvRKEpzyR5J8n1vKT1VZdz9knmPuXhOeg@mail.gmail.com/
[4] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yVJu65TpLgN_ybYNv0VEOKA@mail.gmail.com/

Reviewed-by: Leon Romanovsky <leonro@mellanox.com> # drivers/infiniband and mlx4/mlx5
Acked-by: Jason Gunthorpe <jgg@mellanox.com> # IB
Acked-by: Kalle Valo <kvalo@codeaurora.org> # wireless drivers
Reviewed-by: Chao Yu <yuchao0@huawei.com> # erofs
Signed-off-by: Kees Cook <keescook@chromium.org>


# 83dbbe5a 01-Oct-2019 Dmitry Torokhov <dmitry.torokhov@gmail.com>

platform/x86: hdaps: switch to using polled mode of input devices

We have added polled mode to the normal input devices with the intent of
retiring input_polled_dev. This converts hdaps driver to use the
polling mode of standard input devices and removes dependency on
INPUT_POLLDEV.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>


# 21eb0be9 29-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 271

Based on 1 normalized pattern(s):

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license v2 as published
by the free software foundation this program is distributed in the
hope that it will be useful but without any warranty without even
the implied warranty of merchantability or fitness for a particular
purpose see the gnu general public license for more details you
should have received a copy of the gnu general public license along
with this program if not write to the free software foundation inc
51 franklin street fifth floor boston ma 02110 1301 usa

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-only

has been chosen to replace the boilerplate/reference in 4 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Richard Fontana <rfontana@redhat.com>
Reviewed-by: Alexios Zavras <alexios.zavras@intel.com>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190529141334.424952652@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 6faadbbb 14-Sep-2017 Christoph Hellwig <hch@lst.de>

dmi: Mark all struct dmi_system_id instances const

... and __initconst if applicable.

Based on similar work for an older kernel in the Grsecurity patch.

[JD: fix toshiba-wmi build]
[JD: add htcpen]
[JD: move __initconst where checkscript wants it]

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jean Delvare <jdelvare@suse.de>


# 3493f414 20-Oct-2014 Wolfram Sang <wsa@kernel.org>

platform: x86: drop owner assignment from platform_drivers

A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>


# 3567a4e2 09-Aug-2012 Rafael J. Wysocki <rjw@rjwysocki.net>

platform / x86 / PM: Fix unused function warnings for CONFIG_PM_SLEEP

According to compiler warnings, quite some suspend/resume functions
in platform x86 drivers are not used for CONFIG_PM_SLEEP unset, so
add #ifdefs to prevent them from being built in that case.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>


# e25d5c11 30-Jun-2012 Rafael J. Wysocki <rjw@rjwysocki.net>

hdaps: Use struct dev_pm_ops for power management

Make the HDAPS driver define its PM callbacks through
a struct dev_pm_ops object rather than by using legacy PM hooks
in struct platform_driver.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>


# e4332e8e 28-Apr-2012 Jesper Juhl <jj@chaosbits.net>

hdaps: Jesper Juhl: Fix outdated email address

I haven't had a working gmail address for many years - update to my
actual working address.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Matthew Garrett <mjg@redhat.com>


# a938406b 30-Jan-2012 Danny Kukawka <danny.kukawka@bisect.de>

hdaps: trivial fix for -Wuninitialized

Trivial fix for some -Wuninitialized compiler warnings.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: Matthew Garrett <mjg@redhat.com>


# b94e88bc 24-Nov-2011 Borislav Petkov <bp@alien8.de>

hdaps: Shut up gcc uninitialized variable warnings

Turn off the following triggered with gcc 4.6.1 on Debian testing:

drivers/platform/x86/hdaps.c: In function ‘hdaps_temp2_show’:
drivers/platform/x86/hdaps.c:398:16: warning: ‘temp’ may be used uninitialized in this function [-Wuninitialized]
drivers/platform/x86/hdaps.c: In function ‘hdaps_temp1_show’:
drivers/platform/x86/hdaps.c:385:16: warning: ‘temp’ may be used uninitialized in this function [-Wuninitialized]

Cc: Frank Seidel <frank@f-seidel.de>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: platform-driver-x86@vger.kernel.org
Signed-off-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Matthew Garrett <mjg@redhat.com>


# 4087c471 30-Jan-2012 Danny Kukawka <danny.kukawka@bisect.de>

hdaps: fix for -Wuninitialized

Trivial fix for some -Wuninitialized compiler warnings.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 611f5763 29-Mar-2011 Joe Perches <joe@perches.com>

hdaps: Convert printks to pr_<level>

Added pr_fmt, converted printks and removed
hard coded prefixes.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>


# bd9fc3a7 04-Oct-2010 Jean Delvare <khali@linux-fr.org>

Move hdaps driver to platform/x86

The hdaps driver isn't a hardware monitoring driver, so it shouldn't
live under driver/hwmon. drivers/platform/x86 seems much more
appropriate, as the driver is only useful on x86 laptops.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Frank Seidel <frank@f-seidel.de>
Signed-off-by: Matthew Garrett <mjg@redhat.com>