<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/acpi/button.c, branch v7.2-rc1</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v7.2-rc1</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v7.2-rc1'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-06-02T19:07:51+00:00</updated>
<entry>
<title>ACPI: button: Switch over to devres-based resource management</title>
<updated>2026-06-02T19:07:51+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2026-06-01T17:12:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ec60aaade71b94a6840b467e656b07f456bf2f60'/>
<id>urn:sha1:ec60aaade71b94a6840b467e656b07f456bf2f60</id>
<content type='text'>
Switch over the ACPI button driver to devres-based resource management
by making the following changes:

 * Use devm_kzalloc() for allocating button object memory.

 * Use devm_input_allocate_device() for allocating the input class
   device object.

 * Turn acpi_lid_remove_fs() into a devm cleanup action added
   by devm_acpi_lid_add_fs() which is a new wrapper around
   acpi_lid_add_fs().

 * Add devm_acpi_button_init_wakeup() for initializing the wakeup source
   and make it add a custom devm action that will automatically remove
   the wakeup source registered by it.

 * Turn acpi_button_remove_event_handler() into a devm cleanup action
   added by devm_acpi_button_add_event_handler() which is a new wrapper
   around acpi_button_add_event_handler().

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Link: https://patch.msgid.link/2283436.Mh6RI2rZIc@rafael.j.wysocki
[ rjw: Rebased and removed unnecessary input device parent assignment ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: button: Reorganize installing and removing event handlers</title>
<updated>2026-06-02T19:07:10+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2026-06-01T17:12:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0da41a4c6aa860128d3f224b904aebe41d6bad9d'/>
<id>urn:sha1:0da41a4c6aa860128d3f224b904aebe41d6bad9d</id>
<content type='text'>
To facilitate subsequent changes, move the code installing and
removing button event handlers into two separate functions called
acpi_button_add_event_handler() and acpi_button_remove_event_handler(),
respectively, and rearrange it to reduce code duplication.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Link: https://patch.msgid.link/2714170.Lt9SDvczpP@rafael.j.wysocki
</content>
</entry>
<entry>
<title>ACPI: button: Use string literals for generating netlink messages</title>
<updated>2026-06-02T19:07:09+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2026-06-01T17:07:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dddc802afd5a895c7db94c5076045dc71156fd56'/>
<id>urn:sha1:dddc802afd5a895c7db94c5076045dc71156fd56</id>
<content type='text'>
Instead of storing strings that never change later under
acpi_device_class(device) and using them for generating netlink
messages, use pointers to string literals with the same content.

This also allows the clearing of the acpi_device_class(device)
area during driver removal and in the probe rollback path to be
dropped.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Link: https://patch.msgid.link/2070791.usQuhbGJ8B@rafael.j.wysocki
</content>
</entry>
<entry>
<title>ACPI: button: Clean up adding and removing lid procfs interface</title>
<updated>2026-06-02T19:07:09+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2026-06-01T17:07:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b398eee7d98ccd7294ce5a1a7ced65f3d9a6c1d0'/>
<id>urn:sha1:b398eee7d98ccd7294ce5a1a7ced65f3d9a6c1d0</id>
<content type='text'>
The procfs interface is only used with lid devices which only becomes
clear after looking into the function bodies of acpi_button_add_fs()
and acpi_button_remove_fs().  Moreover, the only error code returned
by the former of these functions is -ENODEV, so the ret local variable
in it is redundant, and the return type of the latter one can be changed
to void.

Accordingly, rename these functions to acpi_button_add_fs() and
acpi_button_remove_fs(), respectively, move the button-&gt;type checks
against ACPI_BUTTON_TYPE_LID from them to their callers, and make
code simplifications as per the above.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Link: https://patch.msgid.link/1869050.VLH7GnMWUR@rafael.j.wysocki
</content>
</entry>
<entry>
<title>ACPI: button: Merge two switch () statements in acpi_button_probe()</title>
<updated>2026-06-02T19:07:09+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2026-06-01T17:05:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a99d758f2b2c83808348908aab00b06f5043aac0'/>
<id>urn:sha1:a99d758f2b2c83808348908aab00b06f5043aac0</id>
<content type='text'>
Two switch () statements in acpi_button_probe() operate on the same
value and the statements between them can be reordered with respect
to the second one, so merge them.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Link: https://patch.msgid.link/3352815.5fSG56mABF@rafael.j.wysocki
</content>
</entry>
<entry>
<title>ACPI: button: Drop redundant variable from acpi_button_probe()</title>
<updated>2026-06-02T19:07:09+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2026-06-01T17:04:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=aa7d6c079958afb37e21bd439fa989b7155c45d4'/>
<id>urn:sha1:aa7d6c079958afb37e21bd439fa989b7155c45d4</id>
<content type='text'>
Local char pointer called "name" in acpi_button_probe() is redundant
because its value can be assigned directly to input-&gt;name and the
latter can be used in the only other place where "name" is read, so
get rid of it.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Link: https://patch.msgid.link/3706239.iIbC2pHGDl@rafael.j.wysocki
</content>
</entry>
<entry>
<title>ACPI: button: Rework device verification during probe</title>
<updated>2026-06-02T19:06:35+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2026-06-01T17:03:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c16c205aeb16e586f645750153064cf9275aafb2'/>
<id>urn:sha1:c16c205aeb16e586f645750153064cf9275aafb2</id>
<content type='text'>
Instead of manually comparing the primary ID of the device (retuned
by _HID) with each of the device IDs supported by the driver, use
acpi_match_acpi_device() (which includes the ACPI companion device
pointer check against NULL) and store the ACPI button type as
driver_data in button_device_ids[], which allows a multi-branch
conditional statement to be replaced with a switch () one.  However,
to continue preventing successful probing of devices that only have
one of the supported device IDs in their _CID lists, compare the
matched device ID with the primary ID of the device and return an
error if they don't match.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Link: https://patch.msgid.link/7960518.EvYhyI6sBW@rafael.j.wysocki
[ rjw: Fixed button memory leak on probe failure ]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>ACPI: button: Use local pointer to platform device dev field in probe</title>
<updated>2026-06-01T17:17:49+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2026-06-01T17:01:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1ad8cdd308da9f9ff044ac49cbe1a375f96c3404'/>
<id>urn:sha1:1ad8cdd308da9f9ff044ac49cbe1a375f96c3404</id>
<content type='text'>
To avoid dereferencing pdev to get to the target platform device's
dev field in multiple places in acpi_button_probe(), use a local pointer
to that field.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Link: https://patch.msgid.link/2049596.PYKUYFuaPT@rafael.j.wysocki
</content>
</entry>
<entry>
<title>ACPI: button: Eliminate redundant conditional statement</title>
<updated>2026-06-01T17:17:49+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2026-06-01T17:00:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d9fa7b95d11d7cdf2930ebac155f7ee8f2d6ebdd'/>
<id>urn:sha1:d9fa7b95d11d7cdf2930ebac155f7ee8f2d6ebdd</id>
<content type='text'>
Simplify do_update initialization in acpi_lid_notify_state() by
assigning the value of the condition it depends on directly to it.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Link: https://patch.msgid.link/10868292.nUPlyArG6x@rafael.j.wysocki
</content>
</entry>
<entry>
<title>ACPI: button: Change return type of two functions to void</title>
<updated>2026-06-01T17:17:49+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2026-06-01T17:00:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=06bc0064ad53be6b8f13b166b2fccbebe9eb6735'/>
<id>urn:sha1:06bc0064ad53be6b8f13b166b2fccbebe9eb6735</id>
<content type='text'>
The return value of acpi_lid_notify_state() is always 0, so change
its return type to void.

Moreover, the return value of the only caller of that function,
acpi_lid_update_state(), is never used, so change its return type
to void either.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Link: https://patch.msgid.link/3429748.44csPzL39Z@rafael.j.wysocki
</content>
</entry>
</feed>
