mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
ACPI support fixes for 7.2-rc2
- Add a missing ACPI_TAD_AC_WAKE capability check omitted by mistake to
the ACPI TAD driver (Xu Rao)
- Define acpi_ut_safe_strncpy() as an alias for strscpy_pad() which is
viable because that function is only called from kernel code (Rafael
Wysocki)
-----BEGIN PGP SIGNATURE-----
iQFGBAABCAAwFiEEcM8Aw/RY0dgsiRUR7l+9nS/U47UFAmpIAfgSHHJqd0Byand5
c29ja2kubmV0AAoJEO5fvZ0v1OO1BrsH/j1RgYp/hU3ws2RFCw7Cs2ap8vbidedB
XtcliFxVfvy4NI5Xlw+YNHW2lyjCcF1lcInumkW1yG5KFkqyOevX6YmnykOJkDON
7alv7rt/W7qLT3BDvZdzUm+zCflm8ieapohpFMEtaJTgguJKwP+0HS3XCQ1eSorH
4mou0SI1qkjqllXZB7PKTPEgcD0ji3dkusjtcp3qvZrgeO9qsZ6C2GABeQwDRIPU
BZhIdjf1jwX/T7Qn5llQHGMWCM78zHSGIRDA6zXnqn7jse5pntbQOwYL/6jRc0QA
kj+9akgDe1YnEAAvIm5cMAygBuqGDCH4S4XEBtQeTc9XwJaDC0g1Hzc=
=ffMf
-----END PGP SIGNATURE-----
Merge tag 'acpi-7.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI support fixes from Rafael Wysocki:
"These fix a coding mistake in the ACPI TAD (Time and Alarm
Device) driver introduced by one of its previous updates and
get rid of the ugly #ifdef __KERNEL__ conditional compilation
in acpi_ut_safe_strncpy() by redefining that function as an
alias for strscpy_pad():
- Add a missing ACPI_TAD_AC_WAKE capability check omitted by mistake
to the ACPI TAD driver (Xu Rao)
- Define acpi_ut_safe_strncpy() as an alias for strscpy_pad()
which is viable because that function is only called from kernel
code (Rafael Wysocki)"
* tag 'acpi-7.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
ACPICA: Define acpi_ut_safe_strncpy() as strscpy_pad() alias
ACPI: TAD: Check AC wake capability before enabling wakeup
This commit is contained in:
commit
e6174e9b38
|
|
@ -856,7 +856,7 @@ static int acpi_tad_probe(struct platform_device *pdev)
|
|||
* runtime suspend. Everything else should be taken care of by the ACPI
|
||||
* PM domain callbacks.
|
||||
*/
|
||||
if (ACPI_TAD_AC_WAKE) {
|
||||
if (caps & ACPI_TAD_AC_WAKE) {
|
||||
device_init_wakeup(dev, true);
|
||||
dev_pm_set_driver_flags(dev, DPM_FLAG_SMART_SUSPEND |
|
||||
DPM_FLAG_MAY_SKIP_RESUME);
|
||||
|
|
|
|||
|
|
@ -626,8 +626,6 @@ void acpi_ut_repair_name(char *name);
|
|||
#if defined (ACPI_DEBUGGER) || defined (ACPI_APPLICATION) || defined (ACPI_DEBUG_OUTPUT)
|
||||
u8 acpi_ut_safe_strcpy(char *dest, acpi_size dest_size, char *source);
|
||||
|
||||
void acpi_ut_safe_strncpy(char *dest, char *source, acpi_size dest_size);
|
||||
|
||||
u8 acpi_ut_safe_strcat(char *dest, acpi_size dest_size, char *source);
|
||||
|
||||
u8
|
||||
|
|
|
|||
|
|
@ -164,20 +164,4 @@ acpi_ut_safe_strncat(char *dest,
|
|||
return (FALSE);
|
||||
}
|
||||
|
||||
void acpi_ut_safe_strncpy(char *dest, char *source, acpi_size dest_size)
|
||||
{
|
||||
/* Always terminate destination string */
|
||||
|
||||
#ifdef __KERNEL__
|
||||
strscpy_pad(dest, source, dest_size);
|
||||
#else
|
||||
/*
|
||||
* strscpy_pad() is not defined in ACPICA tools builds, so use strncpy()
|
||||
* and directly NUL-terminate the destination string in that case.
|
||||
*/
|
||||
strncpy(dest, source, dest_size);
|
||||
dest[dest_size - 1] = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -134,6 +134,7 @@ static inline void acpi_os_terminate_debugger(void)
|
|||
/*
|
||||
* OSL interfaces added by Linux
|
||||
*/
|
||||
#define acpi_ut_safe_strncpy strscpy_pad
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user