<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/acpi/ac.c, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-08-26T17:11:58+00:00</updated>
<entry>
<title>ACPI: AC: Use strscpy() instead of strcpy()</title>
<updated>2024-08-26T17:11:58+00:00</updated>
<author>
<name>Muhammad Qasim Abdul Majeed</name>
<email>qasim.majeed20@gmail.com</email>
</author>
<published>2024-08-04T12:33:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b32c9df02e9e66c575cea20180d734cbbe8ae7b7'/>
<id>urn:sha1:b32c9df02e9e66c575cea20180d734cbbe8ae7b7</id>
<content type='text'>
Replace strcpy() with strscpy() in the ACPI AC driver.

strcpy() has been deprecated because it is generally unsafe, so help to
eliminate it from the kernel source.

Link: https://github.com/KSPP/linux/issues/88
Signed-off-by: Muhammad Qasim Abdul Majeed &lt;qasim.majeed20@gmail.com&gt;
Link: https://patch.msgid.link/20240804123313.16211-1-qasim.majeed20@gmail.com
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: AC: constify powersupply properties</title>
<updated>2024-06-13T19:26:14+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2024-06-09T07:27:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=158ee9f1384a66fdcd28cf84a578fab9f431c45e'/>
<id>urn:sha1:158ee9f1384a66fdcd28cf84a578fab9f431c45e</id>
<content type='text'>
The array is never modified, make it const.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: AC: Properly notify powermanagement core about changes</title>
<updated>2024-05-28T19:56:40+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2024-05-26T21:40:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ac62f52138f752d6c74adc6321e4996d84caf5bb'/>
<id>urn:sha1:ac62f52138f752d6c74adc6321e4996d84caf5bb</id>
<content type='text'>
The powermanagement core does various actions when a powersupply changes.
It calls into notifiers, LED triggers, other power supplies and emits an uevent.

To make sure that all these actions happen properly call power_supply_changed().

Reported-by: Rajas Paranjpe &lt;paranjperajas@gmail.com&gt;
Closes: https://github.com/MrChromebox/firmware/issues/420#issuecomment-2132251318
Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Reviewed-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: AC: Rename ACPI device from device to adev</title>
<updated>2023-10-17T13:43:30+00:00</updated>
<author>
<name>Michal Wilczynski</name>
<email>michal.wilczynski@intel.com</email>
</author>
<published>2023-10-11T08:33:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c7b59371fe56fd98255f87a3e9383c80cb92377e'/>
<id>urn:sha1:c7b59371fe56fd98255f87a3e9383c80cb92377e</id>
<content type='text'>
Since transformation from ACPI driver to platform driver there are two
devices on which the driver operates - ACPI device and platform device.
For the sake of reader this calls for the distinction in their naming,
to avoid confusion. Rename device to adev, as corresponding
platform device is called pdev.

Signed-off-by: Michal Wilczynski &lt;michal.wilczynski@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: AC: Replace acpi_driver with platform_driver</title>
<updated>2023-10-13T18:11:29+00:00</updated>
<author>
<name>Michal Wilczynski</name>
<email>michal.wilczynski@intel.com</email>
</author>
<published>2023-10-11T08:33:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5829046825ac89fffc60f2670bc564fda2c0155a'/>
<id>urn:sha1:5829046825ac89fffc60f2670bc564fda2c0155a</id>
<content type='text'>
The AC driver uses struct acpi_driver to register itself while it would
be more logically consistent to use struct platform_driver for this
purpose, because the corresponding platform device is present and the
role of struct acpi_device is to amend the other bus types. ACPI devices
are not meant to be used as proper representation of hardware entities,
but to collect information on those hardware entities provided by the
platform firmware.

Use struct platform_driver for registering the AC driver.

Suggested-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Michal Wilczynski &lt;michal.wilczynski@intel.com&gt;
[ rjw: Changelog edits, acpi_ac_notify() modifications fixup ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: AC: Use string_choices API instead of ternary operator</title>
<updated>2023-10-13T17:51:54+00:00</updated>
<author>
<name>Michal Wilczynski</name>
<email>michal.wilczynski@intel.com</email>
</author>
<published>2023-10-11T08:33:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=616990c92e40e4721beb66c2f855915fc1f32aba'/>
<id>urn:sha1:616990c92e40e4721beb66c2f855915fc1f32aba</id>
<content type='text'>
Use modern string_choices API instead of manually determining the
output using ternary operator.

Suggested-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Signed-off-by: Michal Wilczynski &lt;michal.wilczynski@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: AC: Remove redundant checks</title>
<updated>2023-10-13T17:51:54+00:00</updated>
<author>
<name>Michal Wilczynski</name>
<email>michal.wilczynski@intel.com</email>
</author>
<published>2023-10-11T08:33:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bc4c9757e324334b84e3ecd52d752cbce54208ab'/>
<id>urn:sha1:bc4c9757e324334b84e3ecd52d752cbce54208ab</id>
<content type='text'>
Remove unnecessary checks against NULL for pointers that can't be NULL
when the checks are done.

Signed-off-by: Michal Wilczynski &lt;michal.wilczynski@intel.com&gt;
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: bus: Add context argument to acpi_dev_install_notify_handler()</title>
<updated>2023-10-06T15:32:51+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2023-10-06T15:32:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=470508f63ad2483b1ae82ed67cd504ad408b2a35'/>
<id>urn:sha1:470508f63ad2483b1ae82ed67cd504ad408b2a35</id>
<content type='text'>
Add void *context arrgument to the list of arguments of
acpi_dev_install_notify_handler() and modify it to pass that argument
as context to acpi_install_notify_handler() instead of its first
argument which is problematic in general (for example, if platform
drivers used it, they would rather get struct platform_device pointers
or pointers to their private data from the context arguments of their
notify handlers).

Make all of the current callers of acpi_dev_install_notify_handler()
take this change into account so as to avoid altering the general
functionality.

Co-developed-by: Michal Wilczynski &lt;michal.wilczynski@intel.com&gt;
Signed-off-by: Michal Wilczynski &lt;michal.wilczynski@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: AC: Install Notify() handler directly</title>
<updated>2023-07-14T16:58:34+00:00</updated>
<author>
<name>Michal Wilczynski</name>
<email>michal.wilczynski@intel.com</email>
</author>
<published>2023-07-03T08:02:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=543a2d115ae63dd4c6d931d714fd5b5d3c362f55'/>
<id>urn:sha1:543a2d115ae63dd4c6d931d714fd5b5d3c362f55</id>
<content type='text'>
Modify the ACPI AC driver to install its own Notify() handler directly
instead of providing an ACPI driver .notify() callback.

This will allow the ACPI driver .notify() callback to be eliminated and
it will allow the AC driver to be switched over to a platform one in the
future.

Suggested-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Michal Wilczynski &lt;michal.wilczynski@intel.com&gt;
[ rjw: Subject and changelog edits, whitespace adjustments ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: make remove callback of ACPI driver void</title>
<updated>2022-11-23T18:11:22+00:00</updated>
<author>
<name>Dawei Li</name>
<email>set_pte_at@outlook.com</email>
</author>
<published>2022-11-13T16:26:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6c0eb5ba3500f6da367351ff3c4452c029cb72fa'/>
<id>urn:sha1:6c0eb5ba3500f6da367351ff3c4452c029cb72fa</id>
<content type='text'>
For bus-based driver, device removal is implemented as:
1 device_remove()-&gt;
2   bus-&gt;remove()-&gt;
3     driver-&gt;remove()

Driver core needs no inform from callee(bus driver) about the
result of remove callback. In that case, commit fc7a6209d571
("bus: Make remove callback return void") forces bus_type::remove
be void-returned.

Now we have the situation that both 1 &amp; 2 of calling chain are
void-returned, so it does not make much sense for 3(driver-&gt;remove)
to return non-void to its caller.

So the basic idea behind this change is making remove() callback of
any bus-based driver to be void-returned.

This change, for itself, is for device drivers based on acpi-bus.

Acked-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Acked-by: Lee Jones &lt;lee@kernel.org&gt;
Acked-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Dawei Li &lt;set_pte_at@outlook.com&gt;
Reviewed-by: Maximilian Luz &lt;luzmaximilian@gmail.com&gt;  # for drivers/platform/surface/*
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
