firmware: arm_scmi: Simplify scmi_devm_notifier_unregister
authorCristian Marussi <cristian.marussi@arm.com>
Mon, 25 Mar 2024 20:46:19 +0000 (20:46 +0000)
committerSudeep Holla <sudeep.holla@arm.com>
Tue, 26 Mar 2024 11:33:33 +0000 (11:33 +0000)
commit264a2c52062802ea6052011015cb3d919dc14d9f
treeb8c4fe2771351af384cd6f5a76bcc7896ca83d07
parent5076ab66db1671a5cd9ecfb857d1949e36a33142
firmware: arm_scmi: Simplify scmi_devm_notifier_unregister

Unregistering SCMI notifications using the managed devres interface can be
done providing as a reference simply the previously successfully registered
notification block since it could have been registered only on one kernel
notification_chain: drop any reference to SCMI protocol, events and
sources.

Devres internal helpers can search for the provided notification block
reference and, once found, the associated devres object will already
provide the above SCMI references for the event.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240325204620.1437237-5-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/firmware/arm_scmi/notify.c
include/linux/scmi_protocol.h