mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
FROMLIST: firmware: arm_scmi: make references to handle const
Now that all the protocol private variable data have been moved out of struct scmi_handle, mark all of its references as const. Signed-off-by: Cristian Marussi <cristian.marussi@arm.com> Bug: 171409184 Link: https://lore.kernel.org/linux-arm-kernel/20210202221555.41167-1-cristian.marussi@arm.com/ Change-Id: I90fb65928da4ec2e4e8043ac5d2179fdaf5fa705 Signed-off-by: Rishabh Bhatnagar <quic_rishabhb@quicinc.com>
This commit is contained in:
committed by
Todd Kjos
parent
30da353917
commit
8e441da50f
@@ -274,8 +274,8 @@ void __exit scmi_##name##_unregister(void) \
|
||||
|
||||
const struct scmi_protocol *scmi_get_protocol(int protocol_id);
|
||||
|
||||
int scmi_acquire_protocol(struct scmi_handle *handle, u8 protocol_id);
|
||||
void scmi_release_protocol(struct scmi_handle *handle, u8 protocol_id);
|
||||
int scmi_acquire_protocol(const struct scmi_handle *handle, u8 protocol_id);
|
||||
void scmi_release_protocol(const struct scmi_handle *handle, u8 protocol_id);
|
||||
|
||||
/* SCMI Transport */
|
||||
/**
|
||||
|
||||
@@ -729,7 +729,7 @@ scmi_get_revision_area(const struct scmi_protocol_handle *ph)
|
||||
* Return: A reference to an initialized protocol instance or error on failure.
|
||||
*/
|
||||
static struct scmi_protocol_instance * __must_check
|
||||
scmi_get_protocol_instance(struct scmi_handle *handle, u8 protocol_id)
|
||||
scmi_get_protocol_instance(const struct scmi_handle *handle, u8 protocol_id)
|
||||
{
|
||||
int ret = -ENOMEM;
|
||||
void *gid;
|
||||
@@ -808,7 +808,7 @@ out:
|
||||
*
|
||||
* Return: 0 if protocol was acquired successfully.
|
||||
*/
|
||||
int scmi_acquire_protocol(struct scmi_handle *handle, u8 protocol_id)
|
||||
int scmi_acquire_protocol(const struct scmi_handle *handle, u8 protocol_id)
|
||||
{
|
||||
return PTR_ERR_OR_ZERO(scmi_get_protocol_instance(handle, protocol_id));
|
||||
}
|
||||
@@ -821,7 +821,7 @@ int scmi_acquire_protocol(struct scmi_handle *handle, u8 protocol_id)
|
||||
* Remove one user for the specified protocol and triggers de-initialization
|
||||
* and resources de-allocation once the last user has gone.
|
||||
*/
|
||||
void scmi_release_protocol(struct scmi_handle *handle, u8 protocol_id)
|
||||
void scmi_release_protocol(const struct scmi_handle *handle, u8 protocol_id)
|
||||
{
|
||||
struct scmi_info *info = handle_to_scmi_info(handle);
|
||||
struct scmi_protocol_instance *pi;
|
||||
@@ -876,7 +876,7 @@ scmi_is_protocol_implemented(const struct scmi_handle *handle, u8 prot_id)
|
||||
}
|
||||
|
||||
struct scmi_protocol_devres {
|
||||
struct scmi_handle *handle;
|
||||
const struct scmi_handle *handle;
|
||||
u8 protocol_id;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user